In DW, Select Insert> form> jump menu to generate a drop-down menu and generate a JS Code. For example:
<SCRIPT type = "text/JavaScript">
<! --
Function mm_jumpmenu (targ, selobj, restore) {// V3.0
Eval (targ + ". Location = '" + selobj. Options [selobj. selectedindex]. Value + "'");
If (Restore) selobj. selectedindex = 0;
}
// -->
</SCRIPT>
<Form name = "form1" id = "form1">
<Select name = "menu1" onchange = "mm_jumpmenu ('parent', this, 0)">
<Option value = "http://www.baidu.com"> Baidu </option>
<Option value = "http://www.sohu.com"> Sohu </option>
</SELECT>
</Form>
If you wantOpen in new windowThe window. Open method is required, for example:
<SCRIPT type = "text/JavaScript">
<! --
Function mm_jumpmenu (targ, selobj, restore) {// V3.0
Eval (targ + ". Open ('" + selobj. Options [selobj. selectedindex]. Value + "')");
If (Restore) selobj. selectedindex = 0;
}
// -->
</SCRIPT>
<Form name = "form1" id = "form1">
<Select name = "menu1" onchange = "mm_jumpmenu ('parent', this, 0)">
<Option value = "http://www.baidu.com"> Baidu </option>
<Option value = "http://www.sohu.com"> Sohu </option>
</SELECT>
</Form>
IfIn a frameworkThe following code is required to display the page!
<Script language = JavaScript>
<! --
Function mm_jumpmenu (targ, selobj, restore) {// V3.0
Window. Open (selobj. Options [selobj. selectedindex]. Value, 'myframework ','');
If (Restore) selobj. selectedindex = 0;
}
// -->
</SCRIPT>
Replace "myframe" with the name of the framework to be displayed. If you want to jump out of a new window and change myframe to mmainframe, you can use it.