如何,我点击按钮然后打开警报框Yos /否,如果单击是,页面是重定向,我单击没有页面不重定向,也<表格>数据不会丢失 [英] How, I Clicked Button Then Open Alert Box Yos/No, If Clicked Yes, Page Is Redirect And I Clicked No Page Is Not Redirect And Also <Form> Data Is No Loss

查看:81
本文介绍了如何,我点击按钮然后打开警报框Yos /否,如果单击是,页面是重定向,我单击没有页面不重定向,也<表格>数据不会丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< input type =text1name =txt1/>

< input type =text2name =txt2/>

将输入类型= 提交 vlaue = 插入 >

解决方案
你的意思是这样

<预郎? =HTML> < 表格 action = 方法 = 发布 onsubmit = 返回确认('您确定吗?'); >
< span class =code-keyword>< input type = text1 名称 = txt1 / >
< 输入 类型 = text2 名称 = txt2 / >
< 输入 type = submit < span class =code-keyword>>
< / form >


<input type="text1" name="txt1" />
<input type= "text2" name="txt2" />
<input type="submit" vlaue="insert">

解决方案

You mean something like this?

<form action="." method="post" onsubmit="return confirm('Are you sure?');">
<input type="text1" name="txt1" />
<input type="text2" name="txt2" />
<input type="submit">
</form>


这篇关于如何,我点击按钮然后打开警报框Yos /否,如果单击是,页面是重定向,我单击没有页面不重定向,也&lt;表格&gt;数据不会丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆