XtGem Forum catalog
Share code máy tính bỏ túi online đẹp | Html, css, javacripst, php, jquery | Wapmaster - Forum-VN #ref-menu
▼ Share code máy tính bỏ túi online đẹp
* Tamhoangdk
- Cấp bậc: admin
19-04-2016
<link rel="stylesheet" type="text/css" href="http://vipprao.wap.sh/CSS/calculator.css" />
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

<form class="calc">
<p class="calc-display">
<input type="text" name="res" id="res" value="VipPrao.Wap.Sh" class="calc-display-input" onfocus="this.blur()">
</p>
<p class="calc-row">
<button type="button" class="calc-button calc-button-gray" onclick="s('Just....')">MRC</button>
<button type="button" class="calc-button calc-button-gray" onclick="s('....do..')">M-</button>
<button type="button" class="calc-button calc-button-gray" onclick="s('......it')">M+</button>
<button type="button" class="calc-button calc-button-red calc-button-big" onclick="a('/')">÷</button>
</p>
<p class="calc-row">
<button type="button" class="calc-button" onclick="a('7')">7</button>
<button type="button" class="calc-button" onclick="a('8')">8</button>
<button type="button" class="calc-button" onclick="a('9')">9</button>
<button type="button" class="calc-button calc-button-red calc-button-big" onclick="a('*')">x</button>
</p>
<p class="calc-row">
<button type="button" class="calc-button" onclick="a('4')">4</button>
<button type="button" class="calc-button" onclick="a('5')">5</button>
<button type="button" class="calc-button" onclick="a('6')">6</button>
<button type="button" class="calc-button calc-button-red calc-button-big" onclick="a('-')">-</button>
</p>
<p class="calc-row">
<button type="button" class="calc-button" onclick="a('1')">1</button>
<button type="button" class="calc-button" onclick="a('2')">2</button>
<button type="button" class="calc-button" onclick="a('3')">3</button>
<button type="button" class="calc-button calc-button-red calc-button-big" onclick="a('+')">+</button>
</p>
<p class="calc-row">
<button type="button" class="calc-button" onclick="a('0')">0</button>
<button type="button" class="calc-button" onclick="a('.')">.</button>
<button type="button" class="calc-button" onclick="s('')">DEL</button>
<button type="button" class="calc-button calc-button-yellow calc-button-big" onclick="e()">=</button>
</p>
</form>
<script>
function s(v) { document.getElementById('res').value = v }
function a(v) { document.getElementById('res').value += v }
function e() { try { s(eval(document.getElementById('res').value)) } catch(e) { s('Error') } }
</script>
Tập tin đính kèm
*
* IMG_20160419_153102.jpg
· image/jpeg
· 26.13KB
▲ Tổng số: 1
- Share:
BBCode:

Link:
Online: Guests: 1

Từ khóa: ,