我有两个单选框
Yes: <html:radio property="sel" value="value1"/>
No: <html:radio property="sel" value="value2"/>另有一个下拉列表,我想实现当选中yes或no时,下拉列表中会出现与之关联的选项,要怎么做啊?
请高手指教!
谢谢!
Yes: <html:radio property="sel" value="value1"/>
No: <html:radio property="sel" value="value2"/>另有一个下拉列表,我想实现当选中yes或no时,下拉列表中会出现与之关联的选项,要怎么做啊?
请高手指教!
谢谢!
function show(){
var selectElement=document.getElementById("selectID");
var optionElement=document.createElement("option");
optionElement.value=...;
selectElement.appendChild(optionElement);
}
能具体解释下show()函数吗?
在单选按钮中加入onclick="javascript:showselectText();"
function showselectText(){
if(document.formname.sel[0].checked){
document.formnameRooms.options[document.formname.selectfieldName.selectedIndex].text="TextXX11";
document.formnameRooms.options[document.formname.selectfieldName.selectedIndex].value="ValueXX11";
}else{
document.formnameRooms.options[document.formname.selectfieldName.selectedIndex].text="TextXX22";
document.formnameRooms.options[document.formname.selectfieldName.selectedIndex].value="ValueXX22";
}
}formname是表单名,selectfieldName是下拉列表域名,sel是你的单选按钮域名。你试一下,应该是这样的,我没有试,JS的东西,语法知道,多试几个就行了。有什么问题,再联系我(同时发消息)
如何调用存储过程将数据传到下拉列表2中