字符串类型问题 HTA版ASCII查询工具

来源:百度知道 编辑:UC知道 时间:2024/09/21 08:01:29
<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 l

本人改了好几次,这是最终代码。
<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 "