相关疑难解决方法(0)

如何使用jQuery生成一个简单的弹出窗口

我正在设计一个网页.当我们点击div命名邮件的内容时,如何显示包含标签电子邮件和文本框的弹出窗口?

javascript css ajax jquery popup

215
推荐指数
5
解决办法
66万
查看次数

是或否使用jQuery确认框

我希望使用jQuery的是/否警报,而不是ok/Cancel按钮:

jQuery.alerts.okButton = 'Yes';
jQuery.alerts.cancelButton = 'No';                  
jConfirm('Are you sure??',  '', function(r) {
    if (r == true) {                    
        //Ok button pressed...
    }  
}
Run Code Online (Sandbox Code Playgroud)

还有其他选择吗?

jquery alerts jconfirm

114
推荐指数
6
解决办法
57万
查看次数

jQuery Deferred和Dialog框

function ValidateField(){
var bAllow= true;

    //some checking here

if (bAllow == true && apl.val().trim() == "")
{ 
    showDialog(); 
    showDialog().done(function() {
        return true; // wanna return true, but not success
    }).fail(function() {
        return false; //wanna return false, but not success
    });
    return false; //stop it to execute to next line
}
return bAllow; //success return }

function showDialog(){
var def = $.Deferred();
var modPop = '<div id="diaCom" title="Information?"><p>something something</p></div>';
$("#diaCom").remove();
$(modPop).appendTo('body');
$("#diaCom").dialog({
    resizable: false,
    draggable: false,
    height:150,
    width:300,
    modal: true,
    buttons: …
Run Code Online (Sandbox Code Playgroud)

javascript jquery jquery-ui

13
推荐指数
2
解决办法
4万
查看次数

Jquery确认不起作用

我试过这个:https : //stackoverflow.com/a/12617274/4164311。字符串“Are you sure about this”刚刚出现在我的浏览器中,当我点击按钮时没有任何反应。

<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI Dialog - Modal confirmation</title>

  <link rel="stylesheet" href="jquery-ui.min.css">
  <script src="external/jquery/jquery.js"></script>
  <script src="jquery-ui.min.js"></script>

  <script>
   $("#dialog").dialog({
   autoOpen: false,
   modal: true,
   buttons : {
        "Confirm" : function() {
            alert("You have confirmed!");            
        },
        "Cancel" : function() {
          $(this).dialog("close");
        }
      }
    });

    $("#callConfirm").on("click", function(e) {
      e.preventDefault();
      $("#dialog").dialog("open");
    });
  </script>
</head>
<body>
<button id="callConfirm">Confirm!</button>

<div id="dialog" title="Confirmation Required">
  Are you sure about this?
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

截屏:

在此处输入图片说明

jquery confirm jquery-ui confirmation

3
推荐指数
1
解决办法
7987
查看次数

标签 统计

jquery ×4

javascript ×2

jquery-ui ×2

ajax ×1

alerts ×1

confirm ×1

confirmation ×1

css ×1

jconfirm ×1

popup ×1