网页特效
建站首页
|
广告代码
|
源码下载
|
站长工具
|
字体下载
|
网页模板
|
收藏本站
|
设为首页
网站首页
菜单导航
日期时间
背景图像
图层样式
鼠标键盘
页面窗口
色彩表格
链接文字
表单按钮
计数转换
游戏娱乐
综合实例
特效
热门搜索:
特效代码
js脚本
导航菜单
热点推荐:
英文字体
人民币汇率
dw插件
站长常用软件
alexa排名查询
您的位置:
网页特效
->
计数转换
-> 经典计算器
经典计算器
作者:经典计算器 发布时间:2007-11-21 23:41:16 发布人: admin
<html> <head> <title>中国建站之家网页特效演示,经典计算器</title> </head><body> <center> <table border="0" cellspacing="0" cellpadding="0" width="239"> <tr> <td width="239" valign="top"><table border="2" width="200" cellspacing="0" cellpadding="0" bgcolor="#000000" style="border-color:black" onclick="previouskey=event.srcElement.innerText"> <tr> <td width="100%" bgcolor="#FFFFFF" id="result" style="font:bold 20px Verdana;color:black;text-align='right'">0</td> </tr> <tr> <td width="100%" valign="middle" align="center"><table border="0" width="100%" cellspacing="0" cellpadding="0" style="font:bold 20px Verdana;color:white"> <tr><td width="80%" align="center"><table border="1" width="100%" cellspacing="0" cellpadding="0" style="cursor:hand;font:bold 20px Verdana;color:white" onmouseover="if (event.srcElement.tagName=='TD')event.srcElement.style.color='yellow'" onmouseout="event.srcElement.style.color='white'" onselectstart="return false" onclick="calculate()" height="82"> <tr><td width="25%" align="center" height="17">7</td> <td width="25%" align="center" height="17">8</td> <td width="25%" align="center" height="17">9</td> <td width="25%" align="center" height="17">/</td> </tr><tr><td width="25%" align="center" height="19">4</td> <td width="25%" align="center" height="19">5</td> <td width="25%" align="center" height="19">6</td> <td width="25%" align="center" height="19">*</td> </tr><tr><td width="25%" align="center" height="19">1</td> <td width="25%" align="center" height="19">2</td> <td width="25%" align="center" height="19">3</td> <td width="25%" align="center" height="19">-</td> </tr><tr><td width="25%" align="center" height="19">0</td> <td width="25%" align="center" height="19" onclick="pn();previouskey=1;event.cancelBubble=true">+/-</td> <td width="25%" align="center" height="19">.</td> <td width="25%" align="center" height="19">+</td> </tr></table></td><td width="20%"><div align="left"><table border="1" width="100%" cellspacing="0" cellpadding="0"><tr><td width="100%" style="cursor:hand;font:bold 20px Verdana;color:white;text-align:center" onclick="result.innerText=0;results=''">C</td> </tr></table></div><div align="left"><table border="1" width="100%" cellspacing="0" cellpadding="0" height="81"> <tr><td width="100%" style="cursor:hand;font:bold 32px Verdana;color:white;text-align:center" onmouseover="event.srcElement.style.color='yellow'" onmouseout="event.srcElement.style.color='white'" onclick="calculateresult()">=<script language="JavaScript1.2"> /* DHTML Calculator Script- ?Dynamic Drive (www.dynamicdrive.com) For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com */ var results='' var previouskey='' var re=/(\/|\*|\+|-)/ var re2=/(\/|\*|\+|-){2}$/ var re3=/.+(\/|\*|\+|-).+/ var re4=/\d|\./ var re5=/^[^\/\*\+].+\d$/ var re6=/\./ function calculate(){ if (event.srcElement.tagName=="TD"){ if (event.srcElement.innerText.match(re4) && previouskey=="=") results='' if (result.innerText.match(re3) && event.srcElement.innerText.match(re)){ if (!results.match(re5)){ result.innerText="Error!" return } results=eval(results) if (results.toString().length>=12 && results.toString().match(re6)) results=results.toString().substring(0,12) result.innerText=results } results+=event.srcElement.innerText if (results.match(re2)) results=results.substring(0,results.length-2)+results.charAt(results.length-1) result.innerText=results } } function calculateresult(){ if (!results.match(re5)){ result.innerText="Error!" return } results=eval(results) if (results.toString().length>=12 && results.toString().match(re6)) results=results.toString().substring(0,12) result.innerText=results } function pn(){ if (result.innerText.charAt(0)!='-') result.innerText=results='-'+result.innerText else if (result.innerText.charAt(0)=='-') result.innerText=results=result.innerText*(-1) } </script></center> </body></html> <a href="http://web.archive.org/web/20150530061319/http://myjs.jz123.cn/">欢迎访问中国建站之家网页特效集</a>
经典计算器
将本文收藏到QQ书签与更多好友分享
上一篇:文章:
元素周期表网页代码
下一篇:文章:
个人所得税计算器网页特效代码
本类浏览排行 »
搜索页面中的内容
又一款综合搜索引擎代码
标题栏显示当前时间
倒影效果的电子表,显示当前时间
自动记录当前页面最新的更新日期
JS让网页每隔2秒弹出一次对话框
一款超酷的CSS列表排行榜
鼠标悬停放大的纯CSS分页效果
本站推荐文章 »
垂直三栏自适应等高布局
仿QQ消息管理器的文本内容样式
支付宝的控制台动画效果菜单
文字、图片拖曳移动
可拉伸移动的DIV层效果
很酷的图片伸缩放大功能
较好的视觉效果的网页选项卡
CSS实例:通过定义渐变边框给图片加阴影