湖南沅江市新湾镇地图:字符串类型问题 HTA版ASCII查询工具

来源:百度文库 编辑:神马品牌网 时间:2024/05/11 19:34:20
<title>ASCII</title>
<hta:application
sysmenu=no
maximizebutton=no
icon=%systemroot%\system32\cmd.exe>
<style type=text/css>
</style>
<body oncontextmenu="return false" scroll=no>
<script language=vbscript>
private clicktime
sub window_onload
w=400
h=600
window.resizeto w,h
window.moveto (screen.width-w)/2,(screen.height-h)/2
window.document.body.style.backgroundcolor="buttonface"
window.document.body.style.borderstyle="none"
clicktime=1
end sub
sub word_onclick
if clicktime=1 then
me.value=""
clicktime=2
end if
end sub
sub searchit_onclick
if document.vbform.word.value<>"" then
'set a=cstr(document.vbform.word.value)
'msgbox a
l=len(a)
set x=result.document
x.open
x.writeln "<body bgcolor=coral topmargin=0 leftmargin=0>"
x.writeln "<table border=1>"
for i = 1 to 40 step 1
c = mid(a,i,1)
ac=asc(c)
if ac<0 then
tp="中"
else
tp="英"
end if
x.writeln "<tr><td width=114><center>"&c&"</center></td><td width=114><center>"&ac&"</center></td><td width=114><center>"&tp&"</center></td></tr>"
next
x.writeln "</table>"
x.writeln "</body>"
x.close
end if
end sub
sub closewindow_onclick
window.close
end sub
</script>
<form name=vbform>
<center>
<input type=text name=word size=44 value=请在此处输入欲查询字符,然后单击查询按钮查询 →>
<input type=button name=searchit value=查询 style="border:1 solid gray">
</center>
<hr>
<table border=0>
<tr><td width=114 bgcolor=silver><center><b>字符</b></center></td><td width=114 bgcolor=silver><center><b>ASCII</b></center></td><td width=114 bgcolor=silver><center><b>中/英文</b></center></td></tr>
</table>
<center><iframe name=result width=370 height=440></iframe></center>
<hr>
<center><input type=button value=点此关闭窗口 name=closewindow style="width:370;height:25;border:1 solid gray"></center>
</form>
</body>
没合适答案的话,悬赏我会收回来的

本人改了好几次,这是最终代码。
<title>ASCII</title>
<hta:application
sysmenu=no
maximizebutton=no
icon=%systemroot%\system32\cmd.exe>
<style type=text/css>
</style>
<body oncontextmenu="return false" scroll=no>
<script language=vbscript>
private clicktime
sub window_onload
w=400
h=600
window.resizeto w,h
window.moveto (screen.width-w)/2,(screen.height-h)/2
window.document.body.style.backgroundcolor="buttonface"
window.document.body.style.borderstyle="none"
clicktime=1
end sub
sub word_onclick
if clicktime=1 then
me.value=""
clicktime=2
end if
end sub
sub searchit_onclick
if document.vbform.word.value<>"" then
a=cstr(document.vbform.word.value) //注意,没有set
l=len(a)
set x=result.document
x.open
x.writeln "<body bgcolor=coral topmargin=0 leftmargin=0>"
x.writeln "<table border=1>"
for i = 1 to l step 1 //注意不是40,而是L
c = mid(a,i,1)
ac=asc(c)
if ac<0 then
tp="中"
else
tp="英"
end if
x.writeln "<tr><td width=114><center>"&c&"</center></td><td width=114><center>"&ac&"</center></td><td width=114><center>"&tp&"</center></td></tr>"
next
x.writeln "</table>"
x.writeln "</body>"
x.close
end if
end sub
sub closewindow_onclick
window.close
end sub
</script>
<form name=vbform>
<center>
<input type=text name=word size=44 value=请在此处输入欲查询字符,然后单击查询按钮查询 →>
<input type=button name=searchit value=查询 style="border:1 solid gray">
</center>
<hr>
<table border=0>
<tr><td width=114 bgcolor=silver><center><b>字符</b></center></td><td width=114 bgcolor=silver><center><b>ASCII</b></center></td><td width=114 bgcolor=silver><center><b>中/英文</b></center></td></tr>
</table>
<center><iframe name=result width=370 height=440></iframe></center>
<hr>
<center><input type=button value=点此关闭窗口 name=closewindow style="width:370;height:25;border:1 solid gray"></center>
</form>
</body>
ok了 改了好多次,研究了一下午。才发现是for 1 to 40 的错!真是晕啊!
对了,我这有exe版的查看assic码的工具。只有16.5k想要的话 可以加我Q:279747238 验证内容写:assic.exe 就可以了

哇,好复杂,我不懂耶,不过我祝你能找到答案~

乍一看,好像懂,仔细一看,还是祝福你吧

乍一看,好像懂,仔细一看,还是祝福你吧

好像懂,仔细一看,还是祝福你吧

问题太专业啊,我是解决不了了

不过提醒楼主一下啊

悬赏出去的分是收不回来的,楼主一定要选个还凑合的给他啊,不然就浪费了