<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<style>
div#green {background:#00FF00;width:100px;height:100px;}
div#blue {background:#0000FF;width:100px;height:100px;}
</style>
<Script Language="JavaScript">
function showthis(){
var colorthis=document.form1;
if(colorthis.cc[0].checked){
green.style.display="";
}
else{
green.style.display="none";
}
}
</Script>
<Script Language="JavaScript">
function test(id){
var test=id;
if(document.getElementById(test).value){
document.getElementById(test).value= "";
}
}
</Script>
<form name="form1" id="form1" action="" method="post" enctype="multipart/form-data"><input type="text" name="tt" id="tt" disabled onfocus="test('tt')" value="test"/>
<input id="cc" name="cc" type="radio" value="1" onclick="showthis()" />点我显示绿
<input id="cc" name="cc" disabled type="radio" value="0" onclick="showthis()" checked="checked" />点我显示蓝
<table id="two">
<table id="green" style="display:none">
<tbody >
<tr>testpage</tr>
</tbody></table>
</table>
</form>
浙公网安备 33010602011771号