用radio控制层的显示和隐藏radio两个圈圈,点其中一个,然后查询按钮,显示下面一个表格,里面是查询数据结果然后点另外一个,查询按钮,显示另外一个表格,里面是查询数据结果
<div onclick="(f.style.display=='none')?f.style.display='block':f.style.display='none';f2.style.display='none';">
tb1:<input type="radio" name="wlcode" value="1" checked/>
</div>
<div onclick="(f2.style.display=='none')?f2.style.display='block':f2.style.display='none';f.style.display='none';">
tb2:<input type="radio" name="wlcode" value="2"/>
</div>
<input type="submit" name="Submit" value="查询";> <table border="1">
....
</table>
现在就是请教下,查询里面改怎么写能控制,我点查询按钮,出来的就是我上面radio选中的需要显示表格现在这样写,点查询就是永远是第一个表格谢谢
<div onclick="(f.style.display=='none')?f.style.display='block':f.style.display='none';f2.style.display='none';">
tb1:<input type="radio" name="wlcode" value="1" checked/>
</div>
<div onclick="(f2.style.display=='none')?f2.style.display='block':f2.style.display='none';f.style.display='none';">
tb2:<input type="radio" name="wlcode" value="2"/>
</div>
<input type="submit" name="Submit" value="查询";> <table border="1">
....
</table>
现在就是请教下,查询里面改怎么写能控制,我点查询按钮,出来的就是我上面radio选中的需要显示表格现在这样写,点查询就是永远是第一个表格谢谢
function divChange(){
var div1=document.getElementById("f");
var div2=document.getElementById("f2");if(div1.style=="none"){
div1.style="block";
div2.style="none";}else{
div1.style="none";
div2.style="block";}
}