JavaScript+HTML给你写个例子吧。<HTML><HEAD><Scripttype="text/javascript">functionCalc(){varx=parseInt(document.getElementById("Text1").value);vary=parseInt(document.getElementById("Text2").value);varxPOWy=Math.pow(x,y);document.getElementById("Text3").value=xPOWy;}</Script></HEAD><BODY><InputType="Text"Size="10"Id="Text1"Value="0">的<InputType="Text"Size="5"Id="Text2"Value="2">次方,等于<InputType="Text"Size="20"Id="Text3"Value="0"><InputType="Button"Value="计算"OnClick="Calc();"></BODY></HTML>
阅读全文 >