87,907
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
<link rel="stylesheet" href="themes/main.css" type="text/css" />
<link rel="Shortcut Icon" href="img/Leicester-City-256x256.ico">
<!--tipswindown插件样式-->
<link rel="stylesheet" href="themes/tipswindown.css" type="text/css" />
<script src="jsa/jquery.min.js" type="text/javascript"></script>
<script src="jsa/tipswindown.js" type="text/javascript">//tipswindown插件</script>
<script src="jsa/jq-main.js" type="text/javascript"></script>
</head> <button id="id1">点击我弹出提示</button>
<div id="testID" style="display: none">
<table>
<tr>
<td><input type="text" id="name" /></td>
<td><input type="text" id="pass" /></td>
<input type="button" value="验证"/>
</tr>
</table>
</div>
</li>
$(function(){
$("input[type=\"button\"]:eq(0)").click(function() {//第几个按钮
//var str="";
$("input[type=\"text\"]").each(function(index, value) {
if (value.value == "") {
alert("不能为空");
value.focus();
return;
}
//str += "<value" + index + ">" + value.value + "</value" + index + ">";
});
});
});
$("input[type=\"button\"]:eq(0)").click(function() {//第几个按钮
//var str="";
$("input[type=\"text\"]").each(function(index, value) {
if (value.value == "") {
alert("不能为空");
value.focus();
return;
}
//str += "<value" + index + ">" + value.value + "</value" + index + ">";
});
});