<html>
<head>
<title></title>
</head>
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<body>
<form action="search.php" method="get" id="myform">
<div class="search">
<dl>
<dt><input type="text" name="search" ></dt>
</dl>
<dl>
<dd><input type="submit" value="提交" ></dd>
</dl>
</div>
<p ><dd><input type="button" value="js提交" class="searchbtn"></dd></p>
</form>
</body>
</html>
<script type="text/javascript">
$(".searchbtn").click(function(){
validate();
})
function validate(){
document.getElementById(‘myform‘).submit();
}
</script>
时间: 2024-11-09 20:32:35