Ask for a piece of php code and a piece of php code. there is an input box on the webpage. enter the radius and click the button to calculate the area of the circle ------ solution ------------------ PHPcode & lt ;? Phpecho & quot; & lt; inputtypetextvalue & gt; & quot; echo & quot; & l calculate 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;