87,910
社区成员
发帖
与我相关
我的任务
分享
<!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>
<title></title>
<meta name="gENERATOR" content="eDITpLUS">
<meta name="aUTHOR" content="">
<meta name="kEYWORDS" content="">
<meta name="dESCRIPTION" content="">
</head>
<body>
<form name="form1" action="" method="POST" onsubmit="return check()">
<div id="div_01" style="display: block;">
<input type="text" name="car_no" id='car_no' />
<input type="text" name="car_no" id='car_no' />
<input TYPE="button" value="下一步" onClick="next('div_01','div_02')" >
</div>
<div id="div_02" style="display: none;">
<input type="text" name="car_no" id='car_no' />
<input type="text" name="car_no" id='car_no' />
<input TYPE="submit" value="下一步" >
</div>
</form>
</body>
<script>
function next(div_01,div_02)
{
var inps = document.getElementById(div_01).getElementsByTagName('input'),
is_true = true;
for(var i = 0; i < inps.length; i++){
if(!inps[i].value){
is_true = false;
}
}
if(is_true){
document.getElementById(div_02).style.display = 'block';
}
}
</script>
</html>