User Profile
Collapse
-
I want to create a magnifyier that magnifies text in any webpage on mouse click, so I would prefer the 2nd one as it works with any content -
-
Thanks very much..got it fixed
I also had another question...if I've a lot of content inside a div..
like "When are you coming home?"
and I need to get only "When are you" when I move my mouse over the first part of the div and when I move it over to the next part of the div, I want to get the rest of the text, ie, "coming home?"
I get the whole stuff using innerHTML...Leave a comment:
-
Adding onclick for all elements in webpage
Hi all,
I've been trying to add onclick event to all elements in the webpage. But somehow it doesn't work. Any help would be greatly appreciated.
Here's my code:
Code:function getIt() {alert("Hello");} var list = document.getElementsByTagName('*'); len = list.length; for(i = 0;i < len;i++) { obj=list[i].tagName; obj.onclick=getIt; }
No activity results to display
Show More
Leave a comment: