One can demonstrate JavaScript as an interpreter by typing JavaScript: into location text bar of your browser.
-
This gives a two frame window where you can directly type JavaScript and see response
|
One can use a similar capability in HREF and other atrribute definitions
-
<a href="javascript:history.go(-1)">Go Back One Step</a>
-
This loads the last page visited in being clicked
-
Using history.go(0) would reload current page
|
The JavaScript Manual describes some interesting Image Map Examples including:
-
<MAP name="buttonbar">
-
<AREA shape="rect" coords="0,0,16,14"
-
HREF="javascript:top.dosomething();
-
top.frames[1].location='URLtobeloadedintoanotherframe.html';" >
-
</MAP>
|