Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <form method="get" action="db.php">
  2. <dl>
  3. <dt>
  4. Part:
  5. </dt>
  6. <dd>
  7. <input type="text" name="part"></input>
  8. </dd>
  9. ....
  10. ....
  11. <a href="#" onClick="document.getElementById('part').value = 'motor';">motor</a>
  12.  
  13. TypeError: document.getElementById(...) is null
  14.  
  15. <a href="#" onClick="document.getElementsByName('part')[0].value = 'motor';">motor</a>
  16.  
  17. <input type="text" name="part" id="part"></input>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement