Find a piece of php code and use a piece of php code. there is an input box on the webpage. after entering the radius, click the button to calculate the area of the circle. PHPcode & lt ;? Phpecho & quot; & lt; inputtype = 'text' id = 'round 'value = ''/& gt; & quot; echo & quot; & find a piece of php code
Find a piece of php code. there is an input box on the webpage. after entering the radius, click the button to calculate the area of the circle.
------ Solution --------------------
PHP code
"; Echo""; Echo"";?> Script var round; var area; var PI = 3.14; function getArea () {round = parseFloat (document. getElementById ("round "). value); area = 4/3 * PI * round; setArea (area);} function setArea (area) {document. getElementById ("area "). innerHTML = "The Round's Area is:" + area;} script
------ Solution --------------------
PHP code
$ Area = 0; if (isset ($ _ GET ['R']) $ area = pi () * $ _ GET ['R'] * $ _ GET ['R']; echo <HTML area = $ areaHTML;