Edit Code in left box and click Show Results button to see the result. | Home
<html> <!-- Mirrored from www.tutorialspoint.com/cgi-bin/practice.cgi?file=jquery_21 by HTTrack Website Copier/3.x [XR&CO'2010], Thu, 01 Sep 2011 14:44:28 GMT --> <!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8"><!-- /Added by HTTrack --> <head> <title>The Selecter Example</title> <script type="text/javascript" src="../jquery/jquery-1.3.2.min.js"> </script> <script type="text/javascript" language="javascript"> $(document).ready(function() { var content = $("input").val(); $("p#pid2").text(content); }); </script> <style> .red { color:red; } .green { color:green; } </style> </head> <body> <input type="text" value="First Input Box"/> <input type="text" value="Second Input Box"/> <p class="green" id="pid1">This is <i>first paragraph</i>.</p> <p class="red" id="pid2">This is second paragraph.</p> </body> <!-- Mirrored from www.tutorialspoint.com/cgi-bin/practice.cgi?file=jquery_21 by HTTrack Website Copier/3.x [XR&CO'2010], Thu, 01 Sep 2011 14:44:28 GMT --> <!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8"><!-- /Added by HTTrack --> </html> |