JavaScript‘ζ‚U‰ρƒ[ƒ~’Ό]’S“–

‰‰K‰π“š


–β‚P

<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=shift_jis">
<META http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script language="JavaScript" type="text/javascript">
var Ans=0 ;
function disp(num){
	document.calc.display.value += num ;
}
function calculate(){
	with(Math){
		eval(document.calc.display.value) ;
		document.calc.old_disp.value=document.calc.display.value ;
		Ans=eval(document.calc.display.value) ;
		document.calc.display.value=eval(document.calc.display.value) ;
	}
}
</script>
</head>
<body bgcolor="#ffffff">
<h3>ŠΘˆΥŠΦ”“d‘μ</h3>
<hr>
<form action="#" name="calc">
<table width="100">

<tr>
<th colspan="5"><textarea cols="25" rows="2" name="display"></textarea></th>
</tr>

<tr>
<th><input type="button" name="sin" value=" sin " onclick="disp('sin(')"></th>
<th><input type="button" name="cos" value=" cos " onclick="disp('cos(')"></th>
<th><input type="button" name="tan" value=" tan " onclick="disp('tan(')"></th>
<th><input type="button" name="ln" value="  ln  " onclick="disp('log(')"></th>
<th><input type="button" name="exp" value=" exp " onclick="disp('exp(')"></th>
</tr>

<tr>
<th><input type="button" name="asin" value="asin" onclick="disp('asin(')"></th>
<th><input type="button" name="acos" value="acos" onclick="disp('acos(')"></th>
<th><input type="button" name="atan" value="atan" onclick="disp('atan(')"></th>
<th><input type="button" name="pow" value=" pow " onclick="disp('pow(')"></th>
<th><input type="button" name="sqr" value=" γ " onclick="disp('sqrt((')"></th>
</tr>
<tr>
<th><input type="button" name="abs" value="  PI " onclick="disp('PI')"></th>
<th><input type="button" name="expo" value="  E  " onclick="disp('E')"></th>
<th><input type="button" name="bra1" value="  (  " onclick="disp('(')"></th>
<th><input type="button" name="bra2" value="  )  " onclick="disp(')')"></th>
<th><input type="button" name="cunm" value="  ,  " onclick="disp(',')"></th>
</tr>

<tr>
</tr>

<tr>
<th><input type="button" name="n7" value="  7  " onclick="disp(7)"></th>
<th><input type="button" name="n8" value="  8  " onclick="disp(8)"></th>
<th><input type="button" name="n9" value="  9  " onclick="disp(9)"></th>
<th><input type="button" name="del" value=" del " onclick="dele()"></th>
<th><input type="button" name="clear" value=" AC " onclick="this.form.display.value=''"></th>
</tr>
<tr>
<th><input type="button" name="n4" value="  4  " onclick="disp(4)"></th>
<th><input type="button" name="n5" value="  5  " onclick="disp(5)"></th>
<th><input type="button" name="n6" value="  6  " onclick="disp(6)"></th>
<th><input type="button" name="mul" value="  *  " onclick="disp('*')"></th>
<th><input type="button" name="div" value="  /  " onclick="disp('/')"></th>
</tr>
<tr>
<th><input type="button" name="n1" value="  1  " onclick="disp(1)"></th>
<th><input type="button" name="n2" value="  2  " onclick="disp(2)"></th>
<th><input type="button" name="n3" value="  3  " onclick="disp(3)"></th>
<th><input type="button" name="pls" value="  +  " onclick="disp('+')"></th>
<th><input type="button" name="ms" value="  -  " onclick="disp('-')"></th>
</tr>
<tr>
<th><input type="button" name="n0" value="  0  " onclick="disp(0)"></th>
<th><input type="button" name="point" value="  .  " onclick="disp('.')"></th>
<th></th>
<th><input type="button" name="ans" value=" Ans " onclick="disp('Ans')"></th>
<th><input type="button" name="eq" value="  =  " onclick="calculate()"></th>
</tr>

</table>
</form>
<hr>
</body>
</html>

–β‚Po—ΝŒ‹‰Κ


–β‚Q

<html>
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script language="JavaScript" type="text/javascript">
function encode(form){
	var myString = encodeURIComponent(form.decodeTxt.value) ;
	window.open('http://www.google.com/search?q='+myString) ;
}
</script>
</head>
<body bgcolor="#ffffff">
<h3>ŠΘˆΥGoogleŒŸυ</h3>
<form name="myForm">
<textarea rows="4" cols="20" name="decodeTxt"></textarea>
<br>
<input type="button" name="ENCODE" value="ŒŸυ" onclick="encode(this.form)">
<br>
</form>

</body>
</html>

–β‚Qo—ΝŒ‹‰Κ