Accueil > > > AVOIR UNE CALCULATRISE, SUR PAGE WEB.
AVOIR UNE CALCULATRISE, SUR PAGE WEB.
Information sur la source
Description
Pour avoir une calculatrise de calcules simples, insérer se script dans vous page web
Source
- <HTML>
-
- <HEAD>
-
- <TITLE>Calculator</TITLE>
-
- <!-- THREE STEPS TO INSTALL CALCULATOR:
- 1. Copy the coding into the HEAD of your HTML document
- 2. Copy the coding into the BODY TAG of your document
- 3. Put the last coding into the BODY of your HTML document -->
-
- <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
-
- <SCRIPT LANGUAGE="javascript">
- <!-- Original: Mike McGrath (mike_mcgrath@lineone.net) -->
- <!-- Web Site: http://website.lineone.net/~mike_mcgrath/index.htm -->
- <!-- BEGIN --
-
- var computed = false;
- var memory = 0;
- var bin = 0;
-
- function addChar(input, character)
- {
- if (computed) reset();
- if (input.value == null || input.value == '0') input.value = character;
- else
- {
- input.value += character;
- computed = false;
- }
- }
-
- function reset()
- {
- document.f.display.value=0;
- document.f.stack.value=0;
- computed = false;
- }
-
- function swipe()
- {
- document.f.stack.value=0;
- computed=true;
- }
-
- function wipe()
- {
- document.f.display.value='';
- computed=false;
- }
-
- function newSlate()
- {
- reset();
- memory=0;
- bin=0;
- }
-
- function deleteChar(input)
- {
- input.value = input.value.substring(0, input.value.length - 1);
- computed = false;
- }
-
- function changeSign(input)
- {
- if(input.value.substring(0, 1) == '-')
- input.value = input.value.substring(1, input.value.length);
- else
- input.value = '-' + input.value;
- computed = false;
- }
-
- function testFirst()
- {
- var a = (document.f.stack.value.substring(0,1));
- if (a == '-' || a == '.' || a == '0' || a== '1' || a == '2' || a =='3' || a == '4' || a == '5' || a == '6' || a == '7' || a == '8' || a == '9')
- testLast()
- else
- alert('Error...\\n\\nEnter Number First!');
- computed = true;
- }
-
- function testLast()
- {
- var b = (document.f.stack.value.substring(document.f.stack.value.length,document.f.stack.value.length-1))
- if (b == '0' || b == '1' || b == '2' || b =='3' || b == '4' || b == '5' || b == '6' || b == '7' || b == '8' || b == '9')
- goOperation()
- else
- alert('Error...\\n\\nEntry Incomplete!');
- computed = true;
- }
-
- function goOperation()
- {
- document.f.display.value=eval(document.f.stack.value) * 100.00 /100.00;
- computed = true;
- }
-
- function cos()
- {
- document.f.display.value=Math.cos(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function acos()
- {
- document.f.display.value=Math.acos(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function sin()
- {
- document.f.display.value=Math.sin(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function asin()
- {
- document.f.display.value=Math.asin(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function tan()
- {
- document.f.display.value=Math.tan(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function atan()
- {
- document.f.display.value=Math.atan(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function log()
- {
- document.f.display.value=Math.log(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function exp()
- {
- document.f.display.value=Math.exp(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function sqrt()
- {
- document.f.display.value=Math.sqrt(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function abs()
- {
- document.f.display.value=Math.abs(document.f.display.value);
- swipe();
- computed=true;
- }
-
- function square()
- {
- document.f.display.value=Math.pow((document.f.display.value), 2);
- swipe();
- computed=true;
- }
-
- function cube()
- {
- document.f.display.value=Math.pow((document.f.display.value), 3);
- swipe();
- computed=true;
- }
-
- function perCent()
- {
- addChar(document.f.stack,'/100');
- wipe();
- computed=false;
- }
-
- function round()
- {
- document.f.display.value=Math.round(document.f.display.value);
- swipe(this.form);
- computed=true;
- }
-
- random.m=714025; random.a=4096; random.c=150889;
- random.seed= (new Date()).getTime()%random.m;
-
- function random()
- {
- random.seed = (random.seed*random.a + random.c) % random.m;
- mikesnum=(random.seed/random.m);
- computed=true;
- }
-
- function mem(c)
- {
- if (c == 1)
- {
- memory =(document.f.display.value * 1);
- document.f.display.value='';
- swipe(this.form);
- computed = false;
- }
-
- if (c == -1)
- {
- document.f.display.value = memory ;
- document.f.stack.value = document.f.display.value;
- computed = false;
- }
-
- if (c == 0)
- {
- document.f.display.value = 0;
- document.f.stack.value=0; memory = 0;
- computed = false;
- }
-
- if (c == 2)
- {
- bin = (document.f.display.value * 1);
- document.f.display.value='';
- swipe(this.form);
- computed = false;
- }
-
- if (c == -2)
- {
- document.f.display.value = bin ;
- document.f.stack.value = document.f.display.value; bin = 0;
- computed = false;
- }
-
- if (c == 3)
- {
- document.f.display.value = 0;
- document.f.stack.value=0;
- bin = 0;
- computed = false;
- }
- }
-
- function onlyTwo()
- {
- document.f.display.value=(document.f.display.value * 100);
- document.f.display.value=Math.round(document.f.display.value)/100;
- swipe();
- computed=true;
- }
-
- function helpFile()
- {
- var content="KEY FEATURES\\n\\n"+
- "< - > Rounds up or down to nearest integer\\n"+
- "<00> Rounds up or down to 2 decimal places\\n"+
- "Num Generates psuedo-random non-cryptograhic number\\n"+
- "M+ Adds single entry only to memory bin no.1\\n"+
- "MR Recalls stored single item from memory bin no.1\\n"+
- "MC Clears item from memory bin no.1\\n"+
- "M2+ Adds single entry only to memory bin no.2\\n"+
- "M2R Recalls single item from memory bin no.2\\n"+
- "M2C Clears item from memory bin no.2\\n"+
- "C Clears all, except memory no.1 and memory no.2\\n"+
- "Clear Resets all features to zero\\n"+
- "+- Inverts value positive/negative of current display value \\n"+
- "<- Deletes last digit of current display\\n"+
- "X2 Returns value of current display to power 2\\n"+
- "X3 Returns value of current display to power 3\\n"+
- "% Divides entry by 100 to return per centage\\n"+
- "Sqrt Returns the square root of display value\\n\\n"+
- "E1/2 Pi Ln2 Ln10 Return Mathematic constants\\n\\n"+
- "Log Abs Atan Tan\\n"+
- "Acos Cos Asin Sin Return Math calculation of display value:"
-
- alert(content);
- }
-
-
- //-- END -->
-
- </SCRIPT>
-
- </HEAD>
-
- <!-- STEP TWO: Paste this code into the BODY TAG of your HTML document -->
-
- <BODY BGCOLOR="black" onload="reset();">
-
- <!-- STEP THREE: Paste this code into the BODY of your HTML document -->
-
- <CENTER>
-
- <P>
-
- <FORM NAME="f">
- <TABLE BGCOLOR=#000000 WIDTH=400 BORDER=5 CELLSPACING=2 CELLPADDING=2>
- <TR>
- <TD BGCOLOR=#C0C0C0 COLSPAN=7 ALIGN=RIGHT>
- <INPUT NAME="display" TYPE=TEXT VALUE=0 SIZE=25>
- <INPUT NAME="stack" TYPE=HIDDEN VALUE=0>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR=#FF0000><INPUT TYPE=BUTTON VALUE=" Help " onclick="helpFile();"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Num " onclick="random()+addChar(display,mikesnum)+addChar(stack,mikesnum);"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" <00> " onclick="onlyTwo();"></TD>
- <TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" <-> " onclick="round();"></TD>
- <TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" M2+ " onclick="mem(2);"></TD>
- <TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE="M2R " onclick="mem(-2);"></TD>
- <TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" M2C" onclick="mem(3);"></TD>
- </TR>
- <TR>
- <TD BGCOLOR=#FF0000><INPUT TYPE=BUTTON VALUE=" Clear" onclick="newSlate();"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" x ³ " onclick="addChar(display.value)+cube();"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" x ² " onclick="addChar(display.value)+square();"></TD>
- <TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" % " onclick="perCent();"></TD>
- <TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" M+ " onclick="mem(1);"></TD>
- <TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" MR " onclick="mem(-1);"></TD>
- <TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" MC " onclick="mem(0);"></TD>
- </TR>
- <TR>
- <TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE=" E " onclick="wipe()+addChar(display,Math.E)+addChar(stack,Math.E);"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Exp " onclick="addChar(display.value)+exp();"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Sqrt " onclick="addChar(stack)+sqrt();"></TD>
- <TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" ÷ " onclick="addChar(stack,'/')+wipe()+addChar(display,'/');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 7 " onclick="addChar(display,'7')+addChar(stack,'7');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 8 " onclick="addChar(display,'8')+addChar(stack,'8');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 9 " onclick="addChar(display,'9')+addChar(stack,'9');"></TD>
- </TR>
- <TR>
- <TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE="Sqrto" onclick="wipe()+addChar(display,Math.SQRT1_2)+addChar(stack,Math.SQRT1_2);"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Log " onclick="addChar(display.value)+log();"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Abs " onclick="addChar(display.value)+abs();"></TD>
- <TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" × " onclick="addChar(stack,'*')+wipe()+addChar(display,'*');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 4 " onclick="addChar(display,'4')+addChar(stack,'4');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 5 " onclick="addChar(display,'5')+addChar(stack,'5');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 6 " onclick="addChar(display,'6')+addChar(stack,'6');"></TD>
- </TR>
- <TR>
- <TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE=" Ln2 " onclick="wipe()+addChar(display,Math.LN2)+addChar(stack,Math.LN2);"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE="ATan" onclick="addChar(display.value)+atan();"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Tan " onclick="addChar(display.value)+tan();"></TD>
- <TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" - " onclick="addChar(stack,'-')+wipe()+addChar(display,'-');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 1 " onclick="addChar(display,'1')+addChar(stack,'1');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 2 " onclick="addChar(display,'2')+addChar(stack,'2');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 3 " onclick="addChar(display,'3')+addChar(stack,'3');"></TD>
- </TR>
- <TR>
- <TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE=" Ln10 " onclick="wipe()+addChar(display,Math.LN10)+addChar(stack,Math.LN10);"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE="ACos" onclick="addChar(display.value)+acos();"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Cos " onclick="addChar(display.value)+cos();"></TD>
- <TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" + " onclick="addChar(stack,'+')+wipe()+addChar(display,'+');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" ± " onclick="changeSign(display)+changeSign(stack);"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" . " onclick="addChar(display,'.')+addChar(stack,'.');"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 0 " onclick="addChar(display,'0')+addChar(stack,'0');"></TD>
- </TR>
- <TR>
- <TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE=" Pi " onclick="wipe()+addChar(display,Math.PI)+addChar(stack,Math.PI);"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" ASin " onclick="addChar(display.value)+asin();"></TD>
- <TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Sin " onclick="addChar(display.value)+sin()+swipe();"></TD>
- <TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" <- " onclick="deleteChar(display)+deleteChar(stack);"></TD>
- <TD BGCOLOR=#FFA500 COLSPAN='2'><INPUT TYPE=BUTTON VALUE=" = " onclick="testFirst()+swipe();"></TD>
- <TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" C " onclick="reset();"></TD>
- </TR>
- </TABLE>
- </FORM>
-
- </CENTER>
-
- </BODY>
-
- </HTML>
-
-
<HTML>
<HEAD>
<TITLE>Calculator</TITLE>
<!-- THREE STEPS TO INSTALL CALCULATOR:
1. Copy the coding into the HEAD of your HTML document
2. Copy the coding into the BODY TAG of your document
3. Put the last coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<SCRIPT LANGUAGE="javascript">
<!-- Original: Mike McGrath (mike_mcgrath@lineone.net) -->
<!-- Web Site: http://website.lineone.net/~mike_mcgrath/index.htm -->
<!-- BEGIN --
var computed = false;
var memory = 0;
var bin = 0;
function addChar(input, character)
{
if (computed) reset();
if (input.value == null || input.value == '0') input.value = character;
else
{
input.value += character;
computed = false;
}
}
function reset()
{
document.f.display.value=0;
document.f.stack.value=0;
computed = false;
}
function swipe()
{
document.f.stack.value=0;
computed=true;
}
function wipe()
{
document.f.display.value='';
computed=false;
}
function newSlate()
{
reset();
memory=0;
bin=0;
}
function deleteChar(input)
{
input.value = input.value.substring(0, input.value.length - 1);
computed = false;
}
function changeSign(input)
{
if(input.value.substring(0, 1) == '-')
input.value = input.value.substring(1, input.value.length);
else
input.value = '-' + input.value;
computed = false;
}
function testFirst()
{
var a = (document.f.stack.value.substring(0,1));
if (a == '-' || a == '.' || a == '0' || a== '1' || a == '2' || a =='3' || a == '4' || a == '5' || a == '6' || a == '7' || a == '8' || a == '9')
testLast()
else
alert('Error...\\n\\nEnter Number First!');
computed = true;
}
function testLast()
{
var b = (document.f.stack.value.substring(document.f.stack.value.length,document.f.stack.value.length-1))
if (b == '0' || b == '1' || b == '2' || b =='3' || b == '4' || b == '5' || b == '6' || b == '7' || b == '8' || b == '9')
goOperation()
else
alert('Error...\\n\\nEntry Incomplete!');
computed = true;
}
function goOperation()
{
document.f.display.value=eval(document.f.stack.value) * 100.00 /100.00;
computed = true;
}
function cos()
{
document.f.display.value=Math.cos(document.f.display.value);
swipe();
computed=true;
}
function acos()
{
document.f.display.value=Math.acos(document.f.display.value);
swipe();
computed=true;
}
function sin()
{
document.f.display.value=Math.sin(document.f.display.value);
swipe();
computed=true;
}
function asin()
{
document.f.display.value=Math.asin(document.f.display.value);
swipe();
computed=true;
}
function tan()
{
document.f.display.value=Math.tan(document.f.display.value);
swipe();
computed=true;
}
function atan()
{
document.f.display.value=Math.atan(document.f.display.value);
swipe();
computed=true;
}
function log()
{
document.f.display.value=Math.log(document.f.display.value);
swipe();
computed=true;
}
function exp()
{
document.f.display.value=Math.exp(document.f.display.value);
swipe();
computed=true;
}
function sqrt()
{
document.f.display.value=Math.sqrt(document.f.display.value);
swipe();
computed=true;
}
function abs()
{
document.f.display.value=Math.abs(document.f.display.value);
swipe();
computed=true;
}
function square()
{
document.f.display.value=Math.pow((document.f.display.value), 2);
swipe();
computed=true;
}
function cube()
{
document.f.display.value=Math.pow((document.f.display.value), 3);
swipe();
computed=true;
}
function perCent()
{
addChar(document.f.stack,'/100');
wipe();
computed=false;
}
function round()
{
document.f.display.value=Math.round(document.f.display.value);
swipe(this.form);
computed=true;
}
random.m=714025; random.a=4096; random.c=150889;
random.seed= (new Date()).getTime()%random.m;
function random()
{
random.seed = (random.seed*random.a + random.c) % random.m;
mikesnum=(random.seed/random.m);
computed=true;
}
function mem(c)
{
if (c == 1)
{
memory =(document.f.display.value * 1);
document.f.display.value='';
swipe(this.form);
computed = false;
}
if (c == -1)
{
document.f.display.value = memory ;
document.f.stack.value = document.f.display.value;
computed = false;
}
if (c == 0)
{
document.f.display.value = 0;
document.f.stack.value=0; memory = 0;
computed = false;
}
if (c == 2)
{
bin = (document.f.display.value * 1);
document.f.display.value='';
swipe(this.form);
computed = false;
}
if (c == -2)
{
document.f.display.value = bin ;
document.f.stack.value = document.f.display.value; bin = 0;
computed = false;
}
if (c == 3)
{
document.f.display.value = 0;
document.f.stack.value=0;
bin = 0;
computed = false;
}
}
function onlyTwo()
{
document.f.display.value=(document.f.display.value * 100);
document.f.display.value=Math.round(document.f.display.value)/100;
swipe();
computed=true;
}
function helpFile()
{
var content="KEY FEATURES\\n\\n"+
"< - > Rounds up or down to nearest integer\\n"+
"<00> Rounds up or down to 2 decimal places\\n"+
"Num Generates psuedo-random non-cryptograhic number\\n"+
"M+ Adds single entry only to memory bin no.1\\n"+
"MR Recalls stored single item from memory bin no.1\\n"+
"MC Clears item from memory bin no.1\\n"+
"M2+ Adds single entry only to memory bin no.2\\n"+
"M2R Recalls single item from memory bin no.2\\n"+
"M2C Clears item from memory bin no.2\\n"+
"C Clears all, except memory no.1 and memory no.2\\n"+
"Clear Resets all features to zero\\n"+
"+- Inverts value positive/negative of current display value \\n"+
"<- Deletes last digit of current display\\n"+
"X2 Returns value of current display to power 2\\n"+
"X3 Returns value of current display to power 3\\n"+
"% Divides entry by 100 to return per centage\\n"+
"Sqrt Returns the square root of display value\\n\\n"+
"E1/2 Pi Ln2 Ln10 Return Mathematic constants\\n\\n"+
"Log Abs Atan Tan\\n"+
"Acos Cos Asin Sin Return Math calculation of display value:"
alert(content);
}
//-- END -->
</SCRIPT>
</HEAD>
<!-- STEP TWO: Paste this code into the BODY TAG of your HTML document -->
<BODY BGCOLOR="black" onload="reset();">
<!-- STEP THREE: Paste this code into the BODY of your HTML document -->
<CENTER>
<P>
<FORM NAME="f">
<TABLE BGCOLOR=#000000 WIDTH=400 BORDER=5 CELLSPACING=2 CELLPADDING=2>
<TR>
<TD BGCOLOR=#C0C0C0 COLSPAN=7 ALIGN=RIGHT>
<INPUT NAME="display" TYPE=TEXT VALUE=0 SIZE=25>
<INPUT NAME="stack" TYPE=HIDDEN VALUE=0>
</TD>
</TR>
<TR>
<TD BGCOLOR=#FF0000><INPUT TYPE=BUTTON VALUE=" Help " onclick="helpFile();"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Num " onclick="random()+addChar(display,mikesnum)+addChar(stack,mikesnum);"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" <00> " onclick="onlyTwo();"></TD>
<TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" <-> " onclick="round();"></TD>
<TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" M2+ " onclick="mem(2);"></TD>
<TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE="M2R " onclick="mem(-2);"></TD>
<TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" M2C" onclick="mem(3);"></TD>
</TR>
<TR>
<TD BGCOLOR=#FF0000><INPUT TYPE=BUTTON VALUE=" Clear" onclick="newSlate();"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" x ³ " onclick="addChar(display.value)+cube();"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" x ² " onclick="addChar(display.value)+square();"></TD>
<TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" % " onclick="perCent();"></TD>
<TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" M+ " onclick="mem(1);"></TD>
<TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" MR " onclick="mem(-1);"></TD>
<TD BGCOLOR=#800080><INPUT TYPE=BUTTON VALUE=" MC " onclick="mem(0);"></TD>
</TR>
<TR>
<TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE=" E " onclick="wipe()+addChar(display,Math.E)+addChar(stack,Math.E);"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Exp " onclick="addChar(display.value)+exp();"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Sqrt " onclick="addChar(stack)+sqrt();"></TD>
<TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" ÷ " onclick="addChar(stack,'/')+wipe()+addChar(display,'/');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 7 " onclick="addChar(display,'7')+addChar(stack,'7');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 8 " onclick="addChar(display,'8')+addChar(stack,'8');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 9 " onclick="addChar(display,'9')+addChar(stack,'9');"></TD>
</TR>
<TR>
<TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE="Sqrto" onclick="wipe()+addChar(display,Math.SQRT1_2)+addChar(stack,Math.SQRT1_2);"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Log " onclick="addChar(display.value)+log();"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Abs " onclick="addChar(display.value)+abs();"></TD>
<TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" × " onclick="addChar(stack,'*')+wipe()+addChar(display,'*');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 4 " onclick="addChar(display,'4')+addChar(stack,'4');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 5 " onclick="addChar(display,'5')+addChar(stack,'5');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 6 " onclick="addChar(display,'6')+addChar(stack,'6');"></TD>
</TR>
<TR>
<TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE=" Ln2 " onclick="wipe()+addChar(display,Math.LN2)+addChar(stack,Math.LN2);"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE="ATan" onclick="addChar(display.value)+atan();"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Tan " onclick="addChar(display.value)+tan();"></TD>
<TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" - " onclick="addChar(stack,'-')+wipe()+addChar(display,'-');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 1 " onclick="addChar(display,'1')+addChar(stack,'1');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 2 " onclick="addChar(display,'2')+addChar(stack,'2');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 3 " onclick="addChar(display,'3')+addChar(stack,'3');"></TD>
</TR>
<TR>
<TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE=" Ln10 " onclick="wipe()+addChar(display,Math.LN10)+addChar(stack,Math.LN10);"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE="ACos" onclick="addChar(display.value)+acos();"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Cos " onclick="addChar(display.value)+cos();"></TD>
<TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" + " onclick="addChar(stack,'+')+wipe()+addChar(display,'+');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" ± " onclick="changeSign(display)+changeSign(stack);"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" . " onclick="addChar(display,'.')+addChar(stack,'.');"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" 0 " onclick="addChar(display,'0')+addChar(stack,'0');"></TD>
</TR>
<TR>
<TD BGCOLOR=#000080><INPUT TYPE=BUTTON VALUE=" Pi " onclick="wipe()+addChar(display,Math.PI)+addChar(stack,Math.PI);"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" ASin " onclick="addChar(display.value)+asin();"></TD>
<TD BGCOLOR=#0000FF><INPUT TYPE=BUTTON VALUE=" Sin " onclick="addChar(display.value)+sin()+swipe();"></TD>
<TD BGCOLOR=#008000><INPUT TYPE=BUTTON VALUE=" <- " onclick="deleteChar(display)+deleteChar(stack);"></TD>
<TD BGCOLOR=#FFA500 COLSPAN='2'><INPUT TYPE=BUTTON VALUE=" = " onclick="testFirst()+swipe();"></TD>
<TD BGCOLOR=#FFA500><INPUT TYPE=BUTTON VALUE=" C " onclick="reset();"></TD>
</TR>
</TABLE>
</FORM>
</CENTER>
</BODY>
</HTML>
Conclusion
Chaque bouton à sa propre fonction.
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Forum
UTILISER UN .JSUTILISER UN .JS par zaikoe
Cliquez pour lire la suite par zaikoe
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|