西安汽车租赁价格表:一个asp程序怎么改!

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 22:08:18
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><script language="vbscript">
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="vbscript">
function prime(n,i)
i=true
for h=3 to sqr(n)
if n mod h=0 then
i=false
exit for
end if
next h
end sub
</script>
</head>
<body>
<input name="text1" type="text" size="20"><p>
<input type="button" name="button1" value="确认"><p>
<script language="vbscript" >
sub button1_onclick

msgbox "asd"
c=text1.value
if(not isnumeric(c)) then msgbox "别捣乱" :exit sub :
if(c<6)or( c mod 2=1) then msgbox "请输入一个大于6的偶数" :exit sub

for j=3 to c/2 step 2
msgbox "yes"
call prime(j,p)
if p then call prime((c-j),p)
if p then msgbox(c&"="&j&"+"&(c-j):exit for
next

end sub
</script>
</script>
</body>
</html>
这个程序为什么运行不出来!

if p then msgbox(c&"="&j&"+"&(c-j):exit for
这一行少了一个括号
应该是

if p then msgbox(c&"="&j&"+"&(c-j)):exit for