daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Google Extension to Fix Webpage
  2. var dateChange = document.getElementsByName('DateChange');
  3. dateChange.id = 'DateChange';
  4.    
  5. <html>
  6. <head>
  7. <script>
  8.     function do_stuff()
  9.     {
  10.         var elem = document.getElementById('DateChange');
  11.         // do some more stuff
  12.     }
  13. </script>
  14. </head>
  15. <body>
  16. <form name="myForm">
  17.     <input type="hidden" name="DateChange" value="false" />
  18. </form>
  19. </body>
  20. </html>
  21.    
  22. input[name="DateChange"] { color: red }
  23.    
  24. var myForm = document.getElementsByName('myForm')[0];
  25. var elLength = myForm.length;
  26. for (i=0; i<elLength; i++)
  27. {
  28.     myForm.elements[i].id = myForm.elements[i].name;
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top