<script language="javascript">
function save(){
document.form1.action="reg.php";
document.form1.submit();
}
function send(){
document.form1.action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>";
document.form1.submit();
}
</script>
<form method="post" name="form1" id="form1" accept-charset="UTF-8">
<div class="control-group">
<label class="control-label">姓名<span class="required-icon">*</span></label>
<div class="controls">
<input name="user_name" type="text" class="input-xxlarge" placeholder="请输入姓名" myrequired="1">
</div>
</div>
<div class="control-group">
<label class="control-label">手机<span class="required-icon">*</span></label>
<div class="controls">
<input type="text" name="phone">
</div>
</div>
<div class="control-group">
<label class="control-label">验证码<span class="required-icon">*</span></label>
<div class="controls">
<input type="text" name="yzmk" value="">
<button type="button" class="btn" id="btn1" onclick="send();" value="btn1" style="margin-top:8px;">获取验证码</button>
</div>
</div>
<div class="control-group">
<label class="control-label"></label>
<div class="controls">
<input name="submit" onclick="save();" type="button" id="submit" value="提交" >
</div>
</div>
</form>
代码加粗部分是设置的js,但是提交以后,页面没有任何反应。 不知道是哪里出了问题。
Hawavegee