Advertisement
Guest User

eh

a guest
Apr 27th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.86 KB | None | 0 0
  1. <html>
  2. <link rel="stylesheet" type="text/css" href="mycss.css">
  3. <title>What's My Name?</title>
  4. <script>
  5. function myFunction(){
  6. alert("This is an image of a "+document.myForm1.Lion.value+""+document.myForm2.Tiger.value+""+document.myForm3.Bear.value);
  7. document.myForm.submit();
  8. }
  9. </script>
  10.  
  11. <body>
  12. <br>
  13. <center><font class="title">What's My Name?</font></center>
  14.  
  15.  
  16. <table cellpadding="10" width="100" border="0" style="float:left;">
  17. <form name="myForm1">
  18. <tr><td VALIGN="Top" Align="center"><img src="lion.png" width=200px height=200px class="image"></td></tr>
  19. <tr><td VALIGN="Top" Align="center"><input type="text" name="Lion" onChange="myFunction()"></td></tr>
  20. <tr><td VALIGN="Top" Align="center"><input type="button" value="Click Me" onclick="myFunction()"></td></tr>
  21. </form>
  22. </table>
  23.  
  24.  
  25.  
  26. <table cellpadding="10" width="100" border="0" style="float:left;">
  27. <form name="myForm2">
  28. <tr><td VALIGN="Top" Align="center"><img src="tiger.png" width=200px height=200px class="image"></td></tr>
  29. <tr><td VALIGN="Top" Align="center"><input type="text" name="Tiger" onChange="myFunction()"></td></tr>
  30. <tr><td VALIGN="Top" Align="center"><input type="button" value="Click Me" onclick="myFunction()"></td></tr>
  31. </form>
  32. </table>
  33.  
  34.  
  35.  
  36. <table cellpadding="10" width="100" border="0" style="float:left;">
  37. <form name="myForm3">
  38. <tr><td VALIGN="Top" Align="center"><img src="bear.png" width=200px height=200px class="image"></td></tr>
  39. <tr><td VALIGN="Top" Align="center"><input type="text" name="Bear" onChange="myFunction()"></td></tr>
  40. <tr><td VALIGN="Top" Align="center"><input type="button" value="Click Me" onclick="myFunction()"></td></tr>
  41. </form>
  42. </table>
  43.  
  44.  
  45. <br>
  46. <br>
  47. <hr>
  48. <p valign="bottom" align="center">
  49. <center><font class="description">Type the name of the image in the textbox below the image. <br> Then click the button.</font></center>
  50. </p>
  51. <hr>
  52.  
  53. </body>
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement