📄 input元素.htm
字号:
<html>
<head>
<title>表</title>
</head>
<script language="javascript">
function getVal()
{
var name,password;
name=user_name;
password=psd;
if(user_name=null||psd=null)
alert("用户名或者密码不可为空,请重新输入!")
else
alert("恭喜你,注册成功!欢迎登陆")
</script>
<body>
<table border="3" cellpadding="4" cellspacing="1" width="80%" align ="center" bgcolor=green>
<form name="简介" method="post" action="D:\我的文档\Visual Studio 2008\Projects\框架.htm">
<tr height="200" align="center" bgcolor=blue>
<td colspan="6">个人信息</td>
</tr>
<tr height="10" bgcolor=red>
<td align="center"width="50">用户名:</td>
<td>
<input type="text" name="user_name" size="10" value="请输入姓名">
<input type="button" value="测试用户名" onclick="getVal()">
</td>
</tr>
<tr height="20" bgcolor=fuchsia>
<td align="center" width="100">密码:</td>
<td>
<input type="password" name="psd" size="20">
</td>
</tr>
<tr height="30" bgcolor=gray>
<td align="right" width="200">性别:</td>
<td>
<input type="radio" name="sex" value="1"checked>男
<input type="radio"name="sex" value="0">女
</td>
</tr>
<tr height="50" bgcolor=aqua>
<td align="right" width="150">个人爱好:</td>
<td>
<input type="checkbox"name="interest1"value="ty">体育
<input type="checkbox"name="interest2"value="yy">音乐
<input type="checkbox"name="interest3"value="ly">旅游
<input type="checkbox"name="interest4"value="wx">文学
</td>
</tr>
<tr height="30" bgcolor="navy">
<td align="right" width="100">照片:</td>
<td><input type="file" name="user_pic"size="25"></td>
</tr>
<tr height="28" bgcolor="purple">
<td align="right" width="100"> </td>
<td>
<input type="submit" value="注册"onclick="getVal()">
<input type="reset" value="重置">
<input type="hidden" name="the_name" value="valuetoBeused" />
</td>
</tr>
</form>
</table><
<table width="80%"align="center" border="0" cellpadding="4" cellspacing="1" bgcolor="gray">
<form name="exa2"method="post" action="D:\我的文档\Visual Studio 2008\Projects\框架.htm">
<tr height="28" align="center" bgcolor="#35FA0B">
<td colspan="6">登录</td>
</tr>
<tr height="28" bgcolor="aqua">
<td align="right" width="100">用户名:</td>
<td>
<input type="text" name="user_name"size="16" value="请输入用户名">
</td>
</tr>
<tr height="28"bgcolor="E5AA01">
<td align="right" width="100">密码:</td>
<td>
<input type="text"name="pwd"size="15"> <br>
</td>
</tr>
<tr height="28"bgcolor="48FD01">
<td align="center" width="150">图片:</td>
<td>
<input type="image"src="D:\我的文档\My Pictures\图片\1.jpg"onclick="this.submit()">
</td>
</tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -