在jQuery中的CSS警告框 [英] alert box in css inside jquery

查看:101
本文介绍了在jQuery中的CSS警告框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在jquery 中的 if块中显示一个错误提示框,但错误即将到来。任何人都可以帮助我。我从此网站找到了警告框但在这种情况下,我必须点击错误消息弹出警报来查看警报,但是如何在我的 jquery内部添加错误消息弹出警报警报(如果零件>),以便没有点击那个警报框将apear?

I want to show an error alert box inside the if block in jquery but error is coming. Can anybody help me here. I have found alert box from this website but in that case i have to click on Error Message Popup Alert to see the alert, but how can i add that Error Message Popup Alert alert inside my jquery if part so that without click that alert box will apear?

 $("#textbox").keyup(function () {
    $.getJSON('check.jsp', {
        textboxname: this.value
    },function(data){
      if(data.isTrue){
          $("#textbox").val(''); //clear the text box and show that Error Message Popup Alert
      }
      else{
       //do something 
      }             
     });
});


推荐答案

将其称为下面的代码,

$("#textbox").keyup(function () {
    $.getJSON('check.jsp', {
        textboxname: this.value
    },function(data){
      if(data.isTrue){
          $("#textbox").val(''); //clear the text box and show that Error Message Popup Alert
          csscody.alert(data);
      }
      else{
       //do something 
      }             
     });
});

这篇关于在jQuery中的CSS警告框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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