| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1324 人关注过本帖
标题:高手帮帮忙 崩溃了- -
只看楼主 加入收藏
走一圈
Rank: 1
等 级:新手上路
帖 子:156
专家分:0
注 册:2008-5-9
结帖率:100%
收藏
 问题点数:0 回复次数:7 
高手帮帮忙 崩溃了- -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script for="botton1" event= "onclick" language="vbscript">
dim salary,miuns,tax
function tax()
document.fr.submit
miuns=s1.value
salary=miuns-1600
if salary>=100000 then
tax=(salary-100000)*0.45+(25+150+450+3000+5000+6000+7000+8000)
else if salary>=80000 then
tax=(salary-80000)*0.40+(25+150+450+3000+5000+6000+7000)
else if salary>=60000 then
tax=(salary-60000)*0.35+(25+150+450+3000+5000+6000)
else if salary>=40000 then
tax=(salary-40000)*0.30+(25+150+450+3000+5000)
else if salary>=20000 then
tax=(salary-20000)*0.25+(25+150+450+3000)
else if salary>=5000 then
tax=(salary-5000)*0.20+(25+150+450)
else if salary>=2000 then
tax=(salary-2000)*0.15+(25+150)
else if salary>=500 then
tax=(salary-500)*0.10+25
else if salary>=0 then
tax=salary*0.05
else if then
tax=0
end if
tax=s2.value
miuns-tax=s3.value
end function
</script>
<form name="fr" method="post" action="#" >
<p>工资: <input oncinname="s1" type="text" size="20"/></p>
<p><input type="submit" name="button1" value="计算" onclick="tax()"/></p>
<p>税款:<input type="text" value="&s2&" size="20"/></p>
<p>税后:<input type="text" value="&s3&" size="20"/></p>
<p><input name="botton2" type="reset"  value="重置" /></p>
</form>
</body>
</html>

[[it] 本帖最后由 走一圈 于 2008-10-1 22:53 编辑 [/it]]
搜索更多相关主题的帖子: content PUBLIC title 
2008-10-01 20:15
frankqnj
Rank: 4
等 级:贵宾
威 望:12
帖 子:320
专家分:278
注 册:2008-4-6
收藏
得分:0 
.........无语 又一个把 asp问题发到js版的.

另外  lz  光说帮忙. 也没说是什么问题 ....
2008-10-01 22:46
走一圈
Rank: 1
等 级:新手上路
帖 子:156
专家分:0
注 册:2008-5-9
收藏
得分:0 
我想用HTML写个税计算  我现在的问题是我的vbscript的值没法返回给表
2008-10-01 22:51
frankqnj
Rank: 4
等 级:贵宾
威 望:12
帖 子:320
专家分:278
注 册:2008-4-6
收藏
得分:0 
我才看仔细 原来不是asp..    条件反射了   一见到vbs 就以为是asp........ 汗!!!

发这里确实没错.. 因为 似乎 真的没有 vbscript 版...

您说的 计算好的值 没法返回给表...

是什么意思?
2008-10-01 23:00
走一圈
Rank: 1
等 级:新手上路
帖 子:156
专家分:0
注 册:2008-5-9
收藏
得分:0 
我改好了不过了ASP版本要 要用VB写成HTML 要怎么写
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="textml; charset=gb2312" />
<title>无标题文档</title>
</head>
<%
miuns=request("s1")
dim salary,miuns,tax,s
salary=miuns-1600
if salary>=100000 then
s=salary-100000
tax=s*0.45+25+150+450+3000+5000+6000+7000+8000
else if salary>=80000 then
s=salary-80000
tax=s*0.40+25+150+450+3000+5000+6000+7000
else if salary>=60000 then
s=salary-60000
tax=s*0.35+25+150+450+3000+5000+6000
else if salary>=40000 then
s=salary-40000
tax=s*0.30+25+150+450+3000+5000
else if salary>=20000 then
s=salary-20000
tax=s*0.25+25+150+450+3000
else if salary>=5000 then
s=salary-5000
tax=s*0.20+25+150+450
else if salary>=2000 then
s=salary-2000
tax=s*0.15+25+150
else if salary>=500 then
s=salary-500
tax=s*0.10+25
else if salary>=0 then
tax=salary*0.5
else if salary<0 then
tax=0
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if%>
<body>
<form method="post" action="tax.asp" >
<p>工资: <input id="s1" name="s1" type="text" size="20" value="<%=miuns%>"/></p>
<p><input type="submit" name="button1" value="计算"/></p>
<p>税款:<input id="s2" type="text" size="20" value="<%=tax%>"/></p>
<p>税后:<input id="s3" type="text" size="20" value="<%=miuns-tax%>"/> </p>
<p><input name="botton2" type="reset"  value="重置" /></p>
</form>
</body>
<html>
2008-10-02 02:23
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
先帮你优化一下程序结构

Select Case True
  Case Salary>=100000
    s=....
    Tax=...
  Case Salary>=80000
    s=....
    Tax=...
   ...
End Select

这样会简洁一些
2008-10-02 08:03
走一圈
Rank: 1
等 级:新手上路
帖 子:156
专家分:0
注 册:2008-5-9
收藏
得分:0 
恩 VB语法还真挺烦 多谢 HTML 就不知道怎么写了
2008-10-02 12:24
恋轩念伊人
Rank: 5Rank: 5
来 自:湖南衡阳
等 级:贵宾
威 望:19
帖 子:643
专家分:0
注 册:2008-2-23
收藏
得分:0 

我不是一个随便的人,我随便起来不是人我哦。信不?
2008-10-12 18:51
快速回复:高手帮帮忙 崩溃了- -
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012951 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved