| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 441 人关注过本帖
标题:我来试试
只看楼主 加入收藏
阿光
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2005-4-23
收藏
 问题点数:0 回复次数:0 
我来试试
[CODE]<script language="VBScript">
sub ss()
if form1.t1.value="" or not isnumeric(form1.t1.value) then form1.t1.value=0
if form1.t2.value="" or not isnumeric(form1.t2.value) then form1.t2.value=0
if form1.t3.value="" or not isnumeric(form1.t3.value) then form1.t3.value=0
if form1.t4.value="" or not isnumeric(form1.t4.value) then form1.t4.value=0
form1.t4.value=eval(form1.t1.value)+form1.t2.value+form1.t3.value
end sub
</script>
<form name="form1" method="post" action="">
 <input name="t1" type="text" id="t1" value="0" size="10" onKeyUp="ss()">+
 <input name="t2" type="text" id="t2" value="0" size="10" onKeyUp="ss()">+
 <input name="t3" type="text" id="t3" value="0" size="10" onKeyUp="ss()">=
 <input name="t4" type="text" id="t4" value="0" size="10" onKeyUp="ss()">
</form>
[/CODE]
2005-09-05 21:11
快速回复:我来试试
数据加载中...
 
   



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

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