EasyUI Forum
April 29, 2024, 03:11:03 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: $.messager.alert() in keydown event of numberbox don't display  (Read 2800 times)
mygod
Newbie
*
Posts: 10


View Profile Email
« on: February 09, 2020, 09:47:19 PM »

<!DOCTYPE html>
<html>
<head>
   <meta charset="UTF-8">
   <title>Basic NumberBox - jQuery EasyUI Demo</title>
   <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
   <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
   <link rel="stylesheet" type="text/css" href="../demo.css">
   <script type="text/javascript" src="../../jquery.min.js"></script>
   <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
<script type="text/javascript" >
$(function () {
    $("#NN").numberbox({
        "onChange": function (newValue, oldValue)
         {
                 $.messager.alert('alert', 'hello!', 'warning',function(){
                         var temp=1;
                 });
        }
    });
 });
 </script>
</head>
<body>
   <h2>Basic NumberBox</h2>
   <p>The NumberBox can only accept inputing numbers.</p>
   <div style="margin:20px 0;"></div>
   <div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
      <div style="margin-bottom:20px">
          <input id="NN" class="easyui-numberbox" data-options="min:0,required:true,precision:2,value:0.00"
                    style="width: 100%;" />
      </div>
      <div style="margin-bottom:20px">
         <input class="easyui-numberbox" label="Amount:" labelPosition="top" value="100" style="width:100%;">
      </div>
      <div style="margin-bottom:20px">
         <input class="easyui-numberbox" label="Discount:" labelPosition="top" value="20" suffix="%" style="width:100%;">
      </div>
   </div>
   
</body>
</html>

when I put some numbers in the NN,
then enter press , var temp=1 is execute ,but $.messager.alert don't display
when  mouse click other places ,var temp=1 is execute  ,$.messager.alert  also display

« Last Edit: February 13, 2020, 05:56:51 PM by mygod » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!