Advertisement
rauljrz

Example of onChange events

Jan 29th, 2020
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.90 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Basic CheckBox - jQuery EasyUI Demo</title>
  6.     <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7.     <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8.     <link rel="stylesheet" type="text/css" href="../demo.css">
  9.     <script type="text/javascript" src="../../jquery.min.js"></script>
  10.     <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13.     <h2>Basic example of onChange events</h2>
  14.     <form id="myForm">
  15.         <div>
  16.             <p id='chkCrit1'>
  17.         </div>
  18.         <p id='results'>
  19.     </form>
  20.  
  21.     <script>
  22.         $('#chkCrit1').checkbox({
  23.             label: 'Mexxxicox:',
  24.             value: '1',
  25.             checked: false,
  26.             onChange: function(checked){
  27.                 var textMessage = (checked)?'Tildado' :'Sin Tilde';
  28.                 $('#results').text(' El resultado es: ' + textMessage);            
  29.             }
  30.         })
  31.     </script>
  32. </body>
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement