javascript中的确认提醒 [英] Confirmation alert in javascript

查看:76
本文介绍了javascript中的确认提醒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

var r = confirm("Document Already Exist!Do you want update it?");
if (r == true) {
   //do something
}
else
{
   //do something
}









这在IE10和Firefox中不起作用..



请推荐一个解决方案。





问候,

Anupama





this is not working in IE10 and Firefox..

Please suggest a solution.


Regards,
Anupama

推荐答案

您好Anupama,

通过查看您的代码,我猜您在这里犯了错误

var r =确认(文件已经存在!你要更新吗?);

将上述声明写成

var r = confirm(文件已经存在!你呢?想更新吗?);

你还没有用。



关闭你的问题字符串试试这个并告诉我结果。

如果问题是连续的,请在IE中禁用JavaScript或在Firefox中安装任何脚本阻止程序扩展(如NoScript)。



-

谢谢
Hi Anupama ,
By looking your code I guess that you made a mistake here
var r = confirm("Document Already Exist!Do you want update it?);
write the above statement as
var r = confirm("Document Already Exist!Do you want update it?");
You haven't closed your question string with ".

try this and tell me result.
If problem continuous see JavaScript is disabled in IE or any script blocker extension such as NoScript is installed in firefox.

--
Thanks


这篇关于javascript中的确认提醒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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