jquery Alert提示框 Confirm确认框

作者:网络 来源:佚名 更新时间:2010-11-20 13:16:19 点击:

基本范例

$(document).ready( function() {
 
          $("#alert_button").click( function() {
                      jAlert('This is a custom alert box', 'Alert Dialog');
          });
 
          $("#confirm_button").click( function() {
                 jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
                              jAlert('Confirmed: ' + r, 'Confirmation Results');
                 });
          });
 
         $("#prompt_button").click( function() {
                 jPrompt('Type something:', 'Prefilled value', 'Prompt Dialog', function(r) {
                           if( r ) alert('You entered ' + r);
                 });
         });
 
         $("#alert_button_with_html").click( function() {
                 jAlert('欢迎访问网页设计爱好者');
         });

});