php 中怎样实现带有两个按钮的对话框?

WBOY
Release: 2016-06-23 14:02:55
Original
1295 people have browsed it

在查询数据库后,根据查询结果弹出一个对话框,来选择是否继续上传资料并覆盖原来的数据,确定和取消两个按钮?我现在只能实现一个按钮,请教


回复讨论(解决方案)

添加一个name的属性
后台根据isset($_POST['submit_button_name'])可以判断哪个按扭按下

添加一个name的属性
后台根据isset($_POST['submit_button_name'])可以判断哪个按扭按下
你所说的是在表单中实现的吧?我的upload.php是一表单,表单的action转到upinfo.php中,在upinfo.php中,

if($row)//$row是查询结果{echo "";//只有一个确定按钮,怎样是想两个按钮呢?…………}else{…………}
Copy after login

...
alert当然只有一个按钮
confirm有两个按钮

echo "";

楼主的意思我看的不是很明了,可否贴出部分代码

if($row)//$row是查询结果{echo "";//只有一个确定按钮,怎样是想两个按钮呢?…………}else{…………}
Copy after login

echo "";
太谢谢你了,其实我也知道有confirm这么个对话框,但是就是不会灵活运用,可能根本原因是基础不牢,太谢谢你啦

 if(confirm('是否继续?')){ #go on... }else{ #go back... } FORM echo $form;#}?>
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!