asp里下拉框,select谁能一个个解说一下,手头上的书没讲到这么细

来源:百度知道 编辑:UC知道 时间:2024/06/03 06:27:46
select里的onchang后每一句,都不太了解意思。
<select name="select" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" ><base target=Right>
<option selected>选择商品分类</option>

[this.selectedIndex].value 就是你select的(选择的值)
var jmpURL=this.options[this.selectedIndex].value 就是将你选择的这个值作为参数传递!
window.location=jmpURL你选择的那个联接(URL)
if(jmpURL!='') {window.location=jmpURL;} 如何你选择了,就打开这个网页
else {this.selectedIndex=0 ;}"

后面的是js语句。var是申明变量,后面跟着的是条判断语句
具体的还是去看看有关JS方面的书籍吧