Here is the sample code to show oops concept in javascript.
Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts
Set div’s all anchor tags onclick event using javascript
Tags:
Javascript
Here is an example to set all child anchor tags onclick event.
A div (id str1) has 3 anchor tags (First, Second and Third). When user clicks on any link, it should call “ShowValue” javascript method which displays text of that link. We have to set onclick event dynamically using javascript. See following for this:
A div (id str1) has 3 anchor tags (First, Second and Third). When user clicks on any link, it should call “ShowValue” javascript method which displays text of that link. We have to set onclick event dynamically using javascript. See following for this: