Advertisement
mariammrf_

Additional Code (more boxes)

Feb 28th, 2017
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <p>
  2. Your [INSERT SOMETHING]: <input type="text" id="inputTxt2"><button id="submit2">submit</button> <a href="http://silencethroughwords.tumblr.com/readerinsert">What is this?</a>
  3.  
  4. <script type="text/javascript">
  5. document.getElementById("submit2").addEventListener('click', function(){
  6. var s = escapeRegExp('Y/L/N'); // PUT WHATEVER EXPRESSION HERE BETWEEN THE SINGLE QUOTES
  7. var val = new RegExp(s, "ig");
  8. walk(document.body, val, document.getElementById("inputTxt2").value);
  9. });
  10.  
  11. function escapeRegExp(str) {
  12. return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&amp;");
  13. }
  14. </script>
  15. </p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement