大家好,小淋來為大家解答以上問題。網站計數器,網站計數器很多人還不知道,現在讓我們一起來看看吧!
htmlheadmeta http-equiv=' Content-Type ' Content=' text/html;charset=gb2312' /title鄧丹的計算器/title style type=' text/CSS ' body{ background-image : URL(file :///E |/我的文檔/鄧丹/1 .jpg);} .樣式1 {font-size : 18px;字體粗細:粗體;' color : # 6699 ffont-family : '快遞新,快遞,等寬;}#Layer1 { 位置:絕對;寬度:153 pxh高度:175pxz指數:1;left : 725 pxtop : 277 px }/style script language=' JavaScript ' var Deng=' ',dan=函數disp(dan) { Deng=文檔。表格1。文本1。值丹;文檔。表格1。文本1。值=鄧;}函數慶玲(){文檔。表格1。文本1。值=“”;}函數guanbi() { close()。}函數tuige() { var str 1=文檔。表格1。文本1。價值;str1=str1.substring(0,str1。長度-1);文檔。表格1。文本1。value=str 1;}函數鄧禹(){ var str 1=文檔。表格1。文本1。價值;var result=eval(str 1);文檔。表格1。文本1。值=結果;}函數蔡波(){ var now=new Date();var hour=現在。get hours();var fen=現在。get minutes();var苗=現在。獲取秒數();if(hour10) hour='0 '小時;if(fen 10)fen=' 0 ' fen;if(苗10)苗=' 0 '苗;var time='今天日期' now.getYear()'年now.getMonth() 1 '月' now.getDate()'日時間'小時' : '分' : '苗;文檔。表格1。文本2。價值=時間;var time1=setTimeout('蔡波()',1000);}/script/headbody onLoad='蔡波()' centerform name=' form1 ' pnbsp/p表格寬度='247' border='5 '標題對齊='center' span class='STYLE1 '試做計算器/span/caption tr TD colspan=' 5 ' input name=' text 1 ' type=' text ' value=' 0 ' size=' 32 ' onFocus=' Qingling()'//TD TD input name=' Deng ' type=' button ' value='計算onClick='鄧禹()'//TD/tr tr TD width=' 37 ' input name=' 1 ' type=' button value=' 1 ' onClick=' disp(1)'//TD TD TD width=' 2 ' type=' button ' value=' 2 ' onClick=' disp(2)'//TD TD TD width=' 37 ' input name=' 3 ' type=' button ' value=' 3 ' onClick=' disp(3)'//TD TD TD width=' 37 ' input name/TD TD TD width=' 15 ' input name=' tui ' type=' 按鈕“值=”退格onClick=' tuige()'//TD/tr tr TD input name=' 4 ' type=' button ' value=' 4 ' onClick=' disp(4)'//TD TD input name=' 5 ' type=' button ' value=' 5 ' onClick=' disp(5)'//TD TD input name=' 6 ' type=' button ' value=' 6 ' onClick=' disp(6)'//TD TD input name=' Dian ' type=' button ' value=' . onClick='disp(' . ')'/TD TD input name=' mul ' type=' button ' value=' * ' onClick=' disp(' * )'//TD TD輸入name=' Qing ' type=' button ' value='清零onMouseDown=' Qingling()'//TD/tr tr TD input name=' 7 ' type=' button ' value=' 7 ' onClick=' disp(7)'//TD TD TD input name=' 8 ' type=' button ' value=' 8 ' onClick=' disp(8)'//TD TD input name=' 9 ' type=' button ' value=' 9 ' onClick=' disp(9)'//TD TD input name=' add ' type=' button ' value=' ' onClick=' disp(')關閉onClick='關bi()'//TD/tr tr TD colspan=' 6 ' input name=' text 2 ' type=' text ' size=' 38 '/TD/tr/table! -下面的差異標簽連接上面的身份選擇器樣式#層顯示連接圖片-/表單/中心/正文/html
這個是簡易計算器的源代碼!
至于怎么運行的嘛!你也應該明白哈!
本文到此結束,希望對大家有所幫助。