Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="#">
- <textarea class="input" name="input" type="text" id="txt" />test</textarea>
- <input type="button" value="Run" id="run"/>
- </form>
- $(document).ready(function() {
- $('#run').click(function() {
- var textarea=$('#txt');
- textarea.html(textarea.html().replace(/test/g,"ok"));
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement