File: protocol.html

package info (click to toggle)
elinks 0.12~pre5-9
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 19,604 kB
  • sloc: ansic: 99,308; sh: 5,293; python: 3,878; perl: 2,175; makefile: 1,131; pascal: 924; yacc: 295; lisp: 125; ruby: 70; awk: 65
file content (5 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (9)
1
2
3
4
5
<p><a href="javascript:document.title = 'This is a test'; document.title += ', this document URL is '+document.url;void(0);">Change the document.title while preventing going anywhere because returning <code>undefined</code>.</a></p>

<p><a href="javascript:document.url='elinks.or.cz';">Change the document.url</a> (which is impossible because it's read-only, but the return value of the statement is used as the link target so it magically still works).</p>

<p><a href="javascript:{ document.title = 'This is a test'; document.title += ', this document URL is '+document.url; 'elinks.or.cz' }">Change the document.title and go to elinks.or.cz (return value of statement).</a></p>