Hi everyone,
I am in the process of learning javascript and have a question on
location.href. Does javascript always require the <script language =
"javascript ">
(or script type="text/javascript">) to run?
I'm asking because the following chunk of code (drop down menu that
goes to different parts of the page) works without declaring anywhere
that it's javascript:
<form>
<select name="Library"
onchange="locat ion.href=this.f orm.Library[this.form.Libra ry.selectedInde x].value">
<option value="#First"> First</option>
<option value="#Second" >Second</option>
<option value="#Third"> Third</option>
</select>
</form>
<a name="First">Fi rst Section</a><br><br><br>< br><br><br><br> <br>
<a name="Second">S econd Section</a><br><br><br>< br><br><br><br> <br>
<a name="Third">Th ird Section</a><br><br><br>< br><br><br><br> <br>
"location.h ref" is javascript, right?? (I learned it off the
www.dartmouth.edu page in their drop down menu).
I appreciate any help/explanation on this!!
Andrea
I am in the process of learning javascript and have a question on
location.href. Does javascript always require the <script language =
"javascript ">
(or script type="text/javascript">) to run?
I'm asking because the following chunk of code (drop down menu that
goes to different parts of the page) works without declaring anywhere
that it's javascript:
<form>
<select name="Library"
onchange="locat ion.href=this.f orm.Library[this.form.Libra ry.selectedInde x].value">
<option value="#First"> First</option>
<option value="#Second" >Second</option>
<option value="#Third"> Third</option>
</select>
</form>
<a name="First">Fi rst Section</a><br><br><br>< br><br><br><br> <br>
<a name="Second">S econd Section</a><br><br><br>< br><br><br><br> <br>
<a name="Third">Th ird Section</a><br><br><br>< br><br><br><br> <br>
"location.h ref" is javascript, right?? (I learned it off the
www.dartmouth.edu page in their drop down menu).
I appreciate any help/explanation on this!!
Andrea
Comment