Код:
<html> <head> <meta charset=utf-8> </head> <body> <input type="text" id="a"><br> <input type="text" id="b"><br> <input type="text" readonly id="c"><br> <input type="button" value="Решить" onClick="solve();"> <script language="javascript" type="text/javascript"> //a=3; //b=4; //c=Math.sqrt(a*a+b*b); //alert(c); //document.title=c; //setInterval("document.title=Math.random()",3000); function solve() { kat1=document.getElementById("a").value; kat2=document.getElementById("b").value; //gip=Math.sqrt(kat1*kat1+kat2*kat2); gip=kat1*1+kat2*1; document.getElementById("c").value=gip; } </script> </body> </html>