繁体   English   中英

有没有人可以帮助我为什么 ShowDetail.html 页面在我提交表单时没有打开

[英]is there anyone who can help me why ShowDetail.html page is not opening when i am submitting my form

我不知道为什么这不起作用,当我提交代码时,shoDetail.html 页面没有打开。 我也尝试过输入完整的 URL,但仍然无法正常工作。 我正在与您分享代码。

<div class="form-group row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" >
<button  type="submit" style="margin-left: 70% " class ="btn btn-primary" class="form-control" formaction="showDetail.html">submit</button>
<button type="reset" class="btn" >cancel</button>
</div>
</div>
</form>
</body>

我曾尝试在 form 标签上使用 form 并尝试在 onsubmit 事件中调用 showDetail 。 当我检查代码时,控制台上没有显示错误。

添加此属性代替“formaction”

<button onClick="location='./showDetail.html';">submit</button>

我希望它有效:)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM