当前位置: 代码迷 >> JavaScript >> js解决思路
  详细解决方案

js解决思路

热度:19   发布时间:2012-02-14 19:19:19.0
js
<input   id= "starid "   type= "radio "   name= "starid "   value= "1 "   >
<input   id= "starid "   type= "radio "   name= "starid "   value= "2 "   >
<input   id= "starid "   type= "radio "   name= "starid "   value= "3 "   >
<input   id= "starid "   type= "radio "   name= "starid "   value= "4 "   >
<input   id= "starid "   type= "radio "   name= "starid "   value= "5 "   >

<input   name= "btnNew4 "   type= "button "   class= "mybutton "   id= "btnNew4 "   value= "查看 "   onClick= "dosearck() ">

function   desearch()
{
  var   star=?????  
  window.open( 'show.asp?id=star ');

这个怎么写啊???????????
谢谢
}

------解决方案--------------------
function desearch()
{
var star=?????
window.open( 'show.asp?id= '+star);
}
------解决方案--------------------
<form name= "star ">
<input id= "starid " type= "radio " name= "starid " value= "1 " >
<input id= "starid " type= "radio " name= "starid " value= "2 " >
<input id= "starid " type= "radio " name= "starid " value= "3 " >
<input id= "starid " type= "radio " name= "starid " value= "4 " >
<input id= "starid " type= "radio " name= "starid " value= "5 " >
<input name= "btnNew4 " type= "button " class= "mybutton " id= "btnNew4 " value= "查看 " onClick= "dosearch() ">
</form>
<script>
function dosearch()
{
var idarr=document.star.starid;
for (var i = 0; i < idarr.length; i ++) {
if (idarr[i].checked) {
window.open( 'show.asp?id= ' + idarr[i].value);
}
}
}
</script>
  相关解决方案