Please help me with HTML and JavaScript. I want to make a webpage with a text box and submit button. When i put an image number from 1 to 100 and press submit button to show below a that image that correspond with that number.
Example:
[url]http://s32.postimg.org/jpiq376bn/image.png
This code is with dropdown but i want to edit it with submit button like in image
[CODE]<!DOCTYPE html>
<html>
<script language=”javascript”>
function linkrotate(which){
var mylinks=new Array()
mylinks[0]=”1.jpg”
mylinks[1]=”2.jpg”
mylinks[2]=”3.jpg”
window.location=mylinks[which]
}
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value
}
</script>
<body>
<table border=”0″ cellspacing=”0″ cellpadding=”0″><tr>
<td width=”100%”><form name=”mygallery”>
<form><p><select name=”picture” size=”1″ onChange=”showimage()”>
<option selected value=”1.jpg”>1</option>
<option value=”2.jpg”>2</option>
<option value=”3.jpg”>3</option>
</select></p></form></td></tr>
<tr><td width=”100%”><p align=”center”>
<a href=”javascript:linkrotate(document.mygallery.picture.selectedIndex)” onMouseover=”window.status=”;return true”>
<img src=”1.jpg” name=”pictures” width=”100″ height=”100″ border=0></a></td></tr></table>
</body>
</html>