下面这段程序,是在一本书上看到的,运行时点按钮没反应
<html>
<head>
<title>
按钮事件
</title><style>
<!--
.a{
position:absolute;
left:150;
color:yellow;
weight:bold;
font-family:arial;
text-transform:capitalize
}#d1{
top:100
}#d2{
top:140
}#d3{
top:340
}
-->
</style><script language = vbs>dim dic,x,x1
<% set dic = Server.CreateObject("Scripting.Dictionary")
dic.add "life","a kind of enjoyment"
dic.add "study", "a happy life"
dic.add "money", "a thing that must be pressed for"%>sub find_click()
document.fm.ext.value = ""
x = document.fm.tt.value for each word in dic
if word = x then
document.ext.value = cstr(dic.item(x))
end if
next if len(cstr(document.fm.ext.value)) = 0 then
document.fm.ext.value = "sorry, can not find the word you want." & "<br>" "if you want to add it to dictionary please click 'add'."
end if
end subsub add_click()
x1 = document.fm.ext.value
x2 = document.fm.tt.value
dic.add x1,x2
end sub
</script></head><body bgcolor = "#6699dd">
<center>
<h2 class = "a"> 词典 </h2><br><form name = "fm">
<div class = "a" id = "d1">
INPUT <input type = "text" name = "tt" style = "width:300; height:30">
</div> <div class = "a" id = "d2">
<input type = "text" name = "ext" style = "width:360; height:180; overflow:scroll">
</div> <div class = "a" id = "d3">
<input type = "Button" value = "查找" name = "find" onclick = "find_click" style = "width:105;height:30;bgcolor:#6699dd">   
<input type = "Button" value = "添加" name = "add" onclick = "add_click" style = "width:105;height:30;bgcolor:#6699dd">   
</div>
</form>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货