/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#submitButton").click(function() { if($("#textin").val() == "") { $("#resdiv").append("(No Text)<br />") } else { $("#resdiv").append($("#textin").val() + "<br />"); } }); }); </script> </head> <body> Text In :<br /> <textarea id="textin"></textarea><br /> <input type="button" id="submitButton" value="Send Text" /><br /> <hr /> <div id="resdiv"></div> <hr /> </body> </html>
Comments
