六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 132|回复: 0

根据选择显示不同的界面

[复制链接]

升级  10.2%

171

主题

171

主题

171

主题

进士

Rank: 4

积分
551
 楼主| 发表于 2013-2-7 20:39:08 | 显示全部楼层 |阅读模式
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>   <title>根据选择显示不同的界面</title>   <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">   <meta http-equiv="description" content="this is my page">   <meta http-equiv="content-type" content="text/html; charset=UTF-8">   <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->   <script type="text/javascript">   function init(){    if(teacher.checked){     teacherForm.style.display='';     studentForm.style.display='none';    }    else{     teacherForm.style.display='none';     studentForm.style.display='';    }   }   </script></head><body >   <input type="radio" checked="checked" value="老师" name="test"    id="teacher"    >   老师   <input type="radio" value="学生" name="test" id="student"    >   学生   <br>   <form action="" id="teacherForm">    <TABLE id="table1" width="50%" border=0>     <TBODY>      <TR>       <TD>        教师姓名:       </TD>       <TD>        <input type="text">       </TD>      </TR>      <TR>       <TD>        所在部门:       </TD>       <TD>        <input type="text">       </TD>      </TR>     </TBODY>    </TABLE>   </form>   <form action="" id="studentForm" style="display:'none'">    <TABLE id="table2" width="50%" border=0 >     <TBODY>      <TR>       <TD>        学生姓名:       </TD>       <TD>        <input type="text">       </TD>      </TR>      <TR>       <TD>        所在班级:       </TD>       <TD>        <input type="text">       </TD>      </TR>     </TBODY>    </TABLE>   </form></body></html>
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表