代码如下
js :
function shows(zhiId, shuxing, waiType) {
alert("111");
if (document.getElementById("RadioButton1").checked == true) {
alert("1");
waiType = 1;
}
else if (document.getElementById("RadioButton2").checked) {
alert("2");
waiType = 2;
}
window.location.href = 'zhiLookDetail.aspx?zhiId=' + zhiId + '&shuxing=' + shuxing + '&waiType=' + waiType;
}
求大神 指点迷津~
你那样取肯定取不到的,因为RadioButton1是服务端控件的id,你要取只能查看网页代码,找到页面生成的radio button的id,
类似这样的,id="XXX_RadioButton1"
是不是不用 == true?
试着在两个Button 之一上加一个属性 checked
谢了!各位 我已经解决了 ! 加上这个就行了 !~