document.getElementById("spSl[1]").value 或者
document.form1.elements["spSl[1]"].value
document.form1.elements["spSl[1]"].value
解决方案 »
- 关于jquery异步请求的问题
- 请教javascript中读取数据库一列内容并以select下拉菜单的形式显示
- 请问一下JQuery怎么通过一个对象来找下级的元素?
- javascript中有什么方法可以让页面显示像DIV一样
- 请问如何将数字转成货币格式
- http://www.sooch.cn/product/product.jhtml;jsessionid=61D4F6429C23D3D3DDAB4262B7AB7EFC?category003=01是怎么实现的
- 只要网页里面用到Javascript,浏览器就一定会有提示要用户点“允许”么?
- javascript中查看函数的调用者
- 请问在网页中如何实现当鼠标指向链接的字体时,链接的字体变色且背景色不变。
- 用什么样式可以把输入框的背景变透明
- 简单问题。请帮忙改改
- javascript 如何导入 html 文件
<input type="button" name="Submit" value="购买" onclick="SetOrderForm('5','手机,document.getElementById("spSl[0]").value,'45')"/>
得不到啊?
<input name="spSl[0]" type="text" id="spSl[0]" value="1" size="4" />
<input type="button" name="Submit" value="购买" onclick="SetOrderForm('5','手机',document.getElementById('spSl[0]').value, '45')"/>
</form>
<script>
function SetOrderForm(a,b,c,d){
alert(c);
}
</script>