基于html+jquery開發(fā)的科學(xué)計算器(課程作業(yè))
基于html和jquery開發(fā)的科學(xué)計算器,該科學(xué)計算器可進行乘方、開方、指數(shù)、對數(shù)、三角函數(shù)、統(tǒng)計等方面的運算,又稱函數(shù)計算器。 科學(xué)型帶有所有普通的函數(shù),所有的函數(shù)都分布在鍵盤上以致于你可以不用通過菜單列表來使用它們。 科學(xué)計算器支持顯示24位數(shù)字,支持運算優(yōu)先選擇模式、進制轉(zhuǎn)換功能、標(biāo)準(zhǔn)數(shù)學(xué)函數(shù)、百分比計算、方根計算、對數(shù)、次方、記憶等等功能。
效果預(yù)覽
fktool.com/jisuanqi/ jquery簡介
jQuery是一個快速、簡潔的JavaScript框架,是繼Prototype之后又一個優(yōu)秀的JavaScript代碼庫(或JavaScript框架)。jQuery設(shè)計的宗旨是“write Less,Do More”,即倡導(dǎo)寫更少的代碼,做更多的事情。 jQuery封裝JavaScript常用的功能代碼,提供一種簡便的JavaScript設(shè)計模式,優(yōu)化HTML文檔操作、事件處理、動畫設(shè)計和Ajax交互。jQuery兼容各種主流瀏覽器,如IE 6.0+、FF 1.5+、Safari 2.0+、Opera 9.0+等 關(guān)鍵代碼
<
ul
class
=
"heachackWrap ptb10 clearfix"
>
<
li
class
=
"pr15"
><
input
type
=
"radio"
class
=
"mr10 HdisaBtn"
onclick
=
"inputChangCarry(16)"
name
=
"carry"
checked
=
"checked"
>
十六進制
li
>
<
li
class
=
"pr15"
><
input
type
=
"radio"
class
=
"mr10 HdisaBtn"
onclick
=
"inputChangCarry(10)"
name
=
"carry"
>
十進制
li
>
<
li
class
=
"pr15"
><
input
type
=
"radio"
class
=
"mr10 HdisaBtn"
onclick
=
"inputChangCarry(8)"
name
=
"carry"
>
八進制
li
>
<
li
class
=
"pr15"
><
input
type
=
"radio"
class
=
"mr10 HdisaBtn"
onclick
=
"inputChangCarry(2)"
name
=
"carry"
>
二進制
li
>
<
li
class
=
"pr15"
><
input
type
=
"radio"
class
=
"mr10 HdisaBtn"
value
=
"d"
onclick
=
"inputChangAngle('d')"
name
=
"angle"
>
角度制
li
>
<
li
><
input
type
=
"radio"
class
=
"mr10 HdisaBtn"
value
=
"r"
onclick
=
"inputChangAngle('r')"
name
=
"angle"
checked
=
"checked"
>
弧度制
li
>
ul
>
<
ul
class
=
"heachackWrap mb20 clearfix"
>
<
li
class
=
"pr15"
><
input
type
=
"checkbox"
class
=
"mr10"
onclick
=
"inputshift()"
name
=
"shiftf"
>
上檔功能
li
>
<
li
class
=
"pr15"
><
input
type
=
"checkbox"
class
=
"mr10"
onclick
=
"inputshift()"
name
=
"hypf"
>
雙曲函數(shù)
li
>
<
li
><
input
class
=
"HTxt01 mr10"
readonly
=
""
name
=
"bracket"
>
li
>
<
li
><
input
class
=
"HTxt01 mr10"
readonly
=
""
name
=
"memory"
value
=
"M"
>
li
>
<
li
><
input
class
=
"HTxt01 mr10"
readonly
=
""
name
=
"operator"
>
li
>
<
li
class
=
"fr"
><
input
type
=
"button"
class
=
"Hcolor01"
value
=
"退格"
onclick
=
"backspace()"
>
li
>
<
li
class
=
"fr"
><
input
type
=
"button"
class
=
"Hcolor01 mr10"
value
=
"清屏"
onclick
=
"document.calc.display.value = 0 "
>
li
>
<
li
class
=
"fr"
><
input
type
=
"button"
class
=
"Hcolor01 mr10"
value
=
"全清"
onclick
=
"clearall()"
>
li
>
ul
>