Monday, 21-Aug-2017, 7:42 PM


Main
Sign Up
Login
Wains Organization Welcome Guest | RSS  
Menu

Section categories
Javascripts [45]
Awesome javascripts codes..
HTML scripts [21]
HTML scripts you never seen before...

Information


Please Login Or Register to see all info
Name : Guest
Username : Guest
IP Address : 54.196.69.175
Group : Guests
Browser :

<..........................>
Current date : 21-Aug-2017
Current day : Monday

Get Updates

New Downloads
[ Games/Torrents ]
[ Games/Torrents ]
[ Softwares ]
demo image         
jQuery Book - 1.2-V1 (0)
[ Games/Torrents ]

Statistics

Total online: 1
Guests: 1
Users: 0

Main » Articles » Javascripts

Colourful Calculator
Code

<!-- this script got from www.wainsorg.ucoz.com coded by: AlexWains-->
<body>
<CENTER>
<body bgcolor="black">
<FORM name="Keypad" action="">
<TABLE>
<B>
<TABLE border=2 width=50 height=60 cellpadding=1 cellspacing=5>
<TR>
<TD colspan=3 align=middle>
<input name="ReadOut" type="Text" size=24 value="0" width=100%>
</TD>
<TD
</TD>
<TD>
<a href="/"  
onmouseover="document.bgColor='green'"</a>
<input name="btnClear" type="Button" value=" C " onclick="Clear()">
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='seagreen'"</a>
<input name="btnClearEntry" type="Button" value=" CE " onclick="ClearEntry()">
</TD>
</TR>
<TR>
<TD>
<style type="text/css">
.background {
width:220px;
height:150px;
padding:10px;
background-color: red;
background-image: url(/pix/web_graphics/free_website_graphics/background_patterns/00akiw5.gif);
border: 20px solid rgba(0,0,0,0.3);
/* Safari and Chrome */
-webkit-background-size: contain;

/* Firefox */
-moz-background-size: contain;

/* Internet Explorer */
-ms-background-size: contain;

/* Opera */
-o-background-size: contain;

/* CSS3 */
background-size: contain;
}
</style>
<input name="btnSeven" type="Button" value=" 7 " onclick="NumPressed(7)">
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='red'"</a>
<input name="btnEight" type="Button" value=" 8 " onclick="NumPressed(8)">
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='megenta'"</a>
<input name="btnNine" type="Button" value=" 9 " onclick="NumPressed(9)">
</TD>
<TD>
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='fusia'"</a>
<input name="btnNeg" type="Button" value=" +/- " onclick="Neg()">
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='pink'"</a>
<input name="btnPercent" type="Button" value=" % " onclick="Percent()">
</TD>
</TR>
<TR>
<TD>
<a href="/"
onmouseover="document.bgColor='purple'"</a>
<input name="btnFour" type="Button" value=" 4 " onclick="NumPressed(4)">
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='navy'"</a>
<input name="btnFive" type="Button" value=" 5 " onclick="NumPressed(5)">
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='blue'"</a>
<input name="btnSix" type="Button" value=" 6 " onclick="NumPressed(6)">
</TD>
<TD>
</TD>
<TD align=middle>
<a href="/"
onmouseover="document.bgColor='royalblue'"</a>
<input name="btnPlus" type="Button" value=" + " onclick="Operation('+')">
</TD>
<TD align=middle>
<a href="/"
onmouseover="document.bgColor='skyblue'"</a>
<input name="btnMinus" type="Button" value=" - " onclick="Operation('-')">
</TD>
</TR>
<TR>
<TD>
<a href="/"
onmouseover="document.bgColor='yellow'"</a>
<input name="btnOne" type="Button" value=" 1 " onclick="NumPressed(1)">
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='brown'"</a>
<input name="btnTwo" type="Button" value=" 2 " onclick="NumPressed(2)">
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='almond'"</a>
<input name="btnThree" type="Button" value=" 3 " onclick="NumPressed(3)">
</TD>
<TD>
</TD>
<TD align=middle>
<a href="/"
onmouseover="document.bgColor='white'"</a>
<input name="btnMultiply" type="Button" value=" * " onclick="Operation('*')">
</TD>
<TD align=middle>
<a href="/"
onmouseover="document.bgColor='coral'"</a>
<input name="btnDivide" type="Button" value=" / " onclick="Operation('/')">
</TD>
</TR>
<TR>
<TD>
<a href="/"
onmouseover="document.bgColor='gold'"</a>
<input name="btnZero" type="Button" value=" 0 " onclick="NumPressed(0)">
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='silver'"</a>
<input name="btnDecimal" type="Button" value=" . " onclick="Decimal()">
</TD>
<TD colspan=3>
</TD>
<TD>
<a href="/"
onmouseover="document.bgColor='rainbow'"</a>
<input name="btnEquals" type="Button" value=" = " onclick="Operation('=')">
</TD>
</TR>
</TABLE>
</TABLE>
</B>
</FORM>
</CENTER>
<font face="Verdana, Arial, Helvetica" size=2>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var FKeyPad = document.Keypad;
var Accumulate = 0;
var FlagNewNum = false;
var PendingOp = "";
function NumPressed (Num) {
if (FlagNewNum) {
FKeyPad.ReadOut.value = Num;
FlagNewNum = false;
  }
else {
if (FKeyPad.ReadOut.value == "0")
FKeyPad.ReadOut.value = Num;
else
FKeyPad.ReadOut.value += Num;
  }
}
function Operation (Op) {
var Readout = FKeyPad.ReadOut.value;
if (FlagNewNum && PendingOp != "=");
else
{
FlagNewNum = true;
if ( '+' == PendingOp )
Accumulate += parseFloat(Readout);
else if ( '-' == PendingOp )
Accumulate -= parseFloat(Readout);
else if ( '/' == PendingOp )
Accumulate /= parseFloat(Readout);
else if ( '*' == PendingOp )
Accumulate *= parseFloat(Readout);
else
Accumulate = parseFloat(Readout);
FKeyPad.ReadOut.value = Accumulate;
PendingOp = Op;
  }
}
function Decimal () {
var curReadOut = FKeyPad.ReadOut.value;
if (FlagNewNum) {
curReadOut = "0.";
FlagNewNum = false;
  }
else
{
if (curReadOut.indexOf(".") == -1)
curReadOut += ".";
  }
FKeyPad.ReadOut.value = curReadOut;
}
function ClearEntry () {
FKeyPad.ReadOut.value = "0";
FlagNewNum = true;
}
function Clear () {
Accumulate = 0;
PendingOp = "";
ClearEntry();
}
function Neg () {
FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1;
}
function Percent () {
FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accumulate);
}
// End -->
</SCRIPT>
</body>
<font face="Tahoma"><a target="_blank" href="http://www.wainsorg.ucoz.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>
Category: Javascripts | Added by: Alex (14-Feb-2013) | Author: Ali Ameen Wains E W
Views: 505 | Tags: colourful calculator, Codes, by Ali Ameen Wains, javascripts | Rating: 0.0/0
Total comments: 0
Only registered users can add comments.
[ Sign Up | Login ]
Search

Extras

Partners
Add your website

New Scripts
[ HTML scripts ]
[ Javascripts ]
[18-Apr-2013]
Random Link (0)
[ HTML scripts ]
[14-Mar-2013]
Alignments (0)
[ HTML scripts ]
[14-Mar-2013]
Table with Color effect (0)
[ HTML scripts ]
[14-Mar-2013]
Line Divider (1)

New Blogs
[ Custom Script ]
[ How? ]
[ How? ]
[ How? ]

Our poll
How would you rate your knowledge in uCoz?

Copyright Wains Org. © 2017Powered by uCoz / Customization by Ali Ameen Wains / About AdminPrivacy Policy