|
-
Feb 21st, 2003, 07:16 AM
#1
Thread Starter
Fanatic Member
accesing the text of an <a> tag in javascript *resolved*
how can i access the text of an <a> tag with javascript?? say something like this:
Code:
<script>
function myFunction(){
alert(document.links[0].text)
}
</script>
<a href="http://address">this is the text i want myFunction to display</a>
<form>
<input type="button" onclick="myFunction()">
</form>
i don't know what i need to write instead of "text"!
please help me!!
Last edited by seec77; Feb 21st, 2003 at 07:37 AM.
Best Regards,
seec77
If you helped me, cosinder yourself thanked.
Get each and every Garfield strip here!
Here you can get all Calvin & Hobes strips!
Damn UComics! It was probably unprofitable for them to allow us to just download Garfield and Calving & Hobes strips... so they made folder indexing unallowed on their server!!!
I am 33% addicted to Counterstrike. What about you?
I am 23% addicted to Star Wars. What about you?
I am 0% addicted to Tupac. What about you?
-
Feb 21st, 2003, 07:34 AM
#2
Code:
alert(document.links[0].innerHTML);
-
Feb 21st, 2003, 07:37 AM
#3
Thread Starter
Fanatic Member
Best Regards,
seec77
If you helped me, cosinder yourself thanked.
Get each and every Garfield strip here!
Here you can get all Calvin & Hobes strips!
Damn UComics! It was probably unprofitable for them to allow us to just download Garfield and Calving & Hobes strips... so they made folder indexing unallowed on their server!!!
I am 33% addicted to Counterstrike. What about you?
I am 23% addicted to Star Wars. What about you?
I am 0% addicted to Tupac. What about you?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|