Evertjan. said the following on 10/7/2005 12:14 PM:
Lee wrote on 07 okt 2005 in comp.lang.javascript:
Evertjan. said:
Why?
==============
Oh please:<br>
<a href='javascript:"I told you so!";'>
Do not click me!</a>
==============
It does exactly what the javascript: protocol is supposed to do:
Replace the current page with the value of the Javascript expression.
So it is the same as:
href='javascript:document.write("I told you so!");'
???
No.
document.write will replace the current content of the page.
javascript
:"I told you so!" will replace the current page itself.
Although both will create a new entry in the History trail.
Test both and look at the title bar. View Source and look at the file names.
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq & newsgroup weekly