客户端简单查询实现 新手 请教
新手 虚心求教各位 简单查询实现
<script language="javascript">
var statedate = new array("1879","1982","9865","9187")
var statename= new array("alaska","alabama","kentaxi","texas")
function getstatedate()
{
var selectedstate = document.form[0].text.value
for( var i=0; i< statename.length;i++)
{
if (selectedstate == statename[i])
{break}
}
alert("that state entered union in " + statedate[i] + ".")
}
</script>
<body>
<h4>input the statename you want to serch</h4>
<form name="entryform">
<input type="text" name="text" value="" />
</form>
<form>
<input type="button" value="serch" onclick="getstatedate()" />
</form>
</body>