Javascript examples for jQuery Method and Property:text
"default" a boolean property in JavaScript
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.0.js"></script> <script type="text/javascript"> $(window).load(function(){// www. j av a 2 s. com var a = {boo: false, b: false}; var dom = a.boo ? a.boo : a.b ? a.b : true; $('#result').text(dom); }); </script> </head> <body> <pre id="result"></pre> </body> </html>