深山工作室

深山工作室 >

asp计算器

<%
response.Write "<html>"&_
               "<head>"&_
               "<meta http-equiv=Content-Type content=text/html; charset=gb2312>"&_
               "<title>TAIXUN多功能编辑器--计算器</title>"&_
               "<link href=Design.css rel=stylesheet TYPE=text/css>"%>
                <SCRIPT language=JavaScript>
                function computetoedit(obj)
                {
                return eval(obj.expr.value)
                }
                function compute(obj)
                {obj.expr.value = eval(obj.expr.value)}
                var one = '1'
                var two = '2'
                var three = '3'
                var four = '4'
                var five = '5'
                var six = '6'
                var seven = '7'
                var eight = '8'
                var nine = '9'
                var zero = '0'
                var plus = '+'
                var minus = '-'
                var multiply = '*'
                var divide = '/'
                var decimal = '.'
                function enter(obj, string)
                {obj.expr.value += string}
                </script>
                <script event=onclick for=Ok language=JavaScript>
                a.value = computetoedit(this.form);
                window.returnValue = a.value+"*"+b.value
                window.close();
                </script>
                <script>
                function IsDigit()
                {
                return ((event.keyCode >= 48) && (event.keyCode <= 57));
                }
                </script><%
response.Write "</head><body topmargin=0>"&_
               "<form NAME=calc>"&_
               "<TABLE borderColor=#efefef WIDTH=160 ALIGN=center BORDER=1>"&_
               "<TBODY>"&_
               "<TR>"&_
               "<TD bgColor=#000000 colSpan=4>"&_
               "<INPUT STYLE='BORDER-RIGHT: #000000 1px inset; BORDER-TOP: #000000 1px inset; FONT-SIZE: 18pt; BORDER-LEFT: #000000 1px inset; COLOR: #ffff00; BORDER-BOTTOM: #000000 1px inset; BACKGROUND-COLOR: #000000;' size=12 NAME=expr id=a action='compute(this.form)' ONKEYPRESS='event.returnValue=IsDigit();'>"&_
               "<TR>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, seven)' TYPE=button VALUE=' 7 '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, eight)' TYPE=button VALUE=' 8 '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, nine)' TYPE=button VALUE=' 9 '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, divide)' TYPE=button VALUE=' / '>"&_
               "<TR>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, four)' TYPE=button VALUE=' 4 '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, five)' TYPE=button VALUE=' 5 '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, six)' TYPE=button VALUE=' 6 '> "&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, multiply)' TYPE=button VALUE=' * '>"&_
               "<TR>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, one)' TYPE=button VALUE=' 1 '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, two)' TYPE=button VALUE=' 2 '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, three)' TYPE=button VALUE=' 3 '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, minus)' TYPE=button VALUE=' - '>"&_
               "<TR>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, decimal)' TYPE=button VALUE=' . '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, zero)' TYPE=button VALUE=' 0 '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT TYPE=reset size=3 VALUE=' AC '>"&_
               "<TD WIDTH=40 ALIGN=center>"&_
               "<INPUT onclick='enter(this.form, plus)' TYPE=button VALUE=' + '>"&_
               "<TR ALIGN=center>"&_
               "<TD colSpan=4><INPUT TYPE=button id=b onclick=compute(this.form) VALUE='   =   '>"&_
               "</TR>"&_
               "<TR>"&_
               "<TD colSpan=4><INPUT NAME=button TYPE=button onClick='javascript:window.close()' VALUE=' 关闭 '>    "&_
               "<INPUT NAME=Ok TYPE=button id=Ok VALUE=' 确定 '></TR>"&_
               "</TBODY>"&_
               "</TABLE>"&_
               "</form>"&_
               "</body>"&_
               "</html>"
%>

前一页:特别推荐的asp数字加密(rsa)
后一页:利用asp正则功能去除网页中自定义HTML标记(来自eWebEditor)
相关阅读
javascript获取浏览器指纹可以用来做投票
静态网站利用微信URL Scheme生成的ticket从浏览器h5跳到微信小程序完整代码
RSA加密解密插件
深山旅行社网站管理系统5.0发布
北京神舟国际旅行社集团有限公司
06 iis中Server Application Error问题如何修复
正则的常表达式
实现iis6与iis7环境下支持mp4视频随意拖动、预览播放、边下载边播放
更多>>ASP相关信息
ASP中Utf-8与Gb2312编码转换乱码问题的解决方法页面编码声明
asp显示随机密码
通过阿里云服务接口获得ip地址详细信息
iis点开后任务栏上有显示,但是窗口看不到的解决办法
RSA加密解密插件
更多>>最新添加
dw里面查找替换使用正则删除sqlserver里面的CONSTRAINT
Android移动端自动化测试:使用UIAutomatorViewer与Selenium定位元素
抖音直播音挂载小雪花 懂车帝小程序
javascript获取浏览器指纹可以用来做投票
火狐Mozilla Firefox出现:无法载入您的Firefox配置文件 它可能已经丢失 或是无法访问 问题解决集合处理办法