你的writeSelectBox函数呢我猜应该是
document.getElementById("select2").value;这个是你需要的值
document.getElementById("select2").value;这个是你需要的值
解决方案 »
- 求ie6用js设置top为expression的方法
- 使用jquery生成表格行的问题
- jq $("head").append
- 有关var fso = new ActiveXObject("Scripting.FileSystemObject"); 当使用此控件的问题.
- 怎么取<Input type='text' ....的值
- 关于赋予id的问题的问题
- 关于转义字符和替换的问题?
- event.keyCode在IE中使用正常,请问在Netscape中该如何写?
- 关于实现ajax上传图片的问题
- 图片分块显示不同颜色
- HELP: JavaScript对null的处理?
- 刚发现一个奇怪的问题label标签和input标签的区别。
能帮我写一下代码么,让我的INPUT可以得到值。
var d = window.document; var ie4 = (document.all != null); if (ie4) {
// alert("Before!");
var s = createIEString(matrix, id, size, onchange, css);
document.write(s);
// alert("After!");
// alert(s);
} else {
document.write(createXString(matrix, id, size, onchange, css));
}
}这个函数是在其它的文件里面的。 但我不知道怎么搞到INPUT里面去
然后:
function getselectValue()
{
document.getElementById("NumName").value=document.getElementById("select2").options[document.getElementById("select2").selectIndex].value;
}你的目的就是将下拉框选中的值赋值给input框,是啊?select2就是你那个下拉框。如果不是,你把名字替换即可