amplthtmlampgtampltheadampgtamplttitleampgt


<HTML>

<HEAD>

<TITLE> Working with Radio Buttons </TITLE>

<SCRIPT LANGUAGE="JavaScript">

function calculate(form)

{

if(form.elements[2].checked)

{

}

else

{

form.result.value = form.entry.value * form.entry.value;

form.result.value = form.entry.value * 2;

}

 

}

</SCRIPT>

</HEAD>

<BODY>

<FORM >

<CENTER><BR>

<B>Value:</B>

<INPUT  TYPE="text"  NAME="entry"  VALUE=0>

<BR><BR>

<SPACER Size= 190>

<B>Action:<B><BR>

<SPACER Size = 225>

<INPUT TYPE="radio" NAME="action1" VALUE="twice" onClick="calculate (this.form);">Double<BR>

<SPACER Size = 225>

<INPUT TYPE="radio" NAME="action1"  VALUE="square" onClick="calculate(this.form);">Square <BR><BR>

<B>Result:</B>

<INPUT TYPE=text NAME="result" onFocus = "this.blur();">

</CENTER>

</FORM>

 </BODY>

</HTML>

Request for Solution File

Ask an Expert for Answer!!
PHP Web Programming: amplthtmlampgtampltheadampgtamplttitleampgt
Reference No:- TGS0416514

Expected delivery within 24 Hours