how ca I use textbox in table

S

Sudhanshu

I'm not able to use the values of text boxes. can anyone help me to do
so.

thank u.

<body text=white>
<form name="frm1">
<h3>Mathematical Operations<h3>
<table border=2 bgcolor=black cellpadding=10 name="tbl">
<tr><td>
Number 1:<input type="text" name="num1"width=15>
<br>
Number 2:<input type="text" name="num2" width=15>
</td></tr><tr><td>
Operator :
<input type="button" name=pls value=" + "
OnClick="calc("+",frm1)">
<input type="button" name=mns value=" - "
OnClick="calc("-",frm1)">
<input type="button" name=mul value=" X "
OnClick="calc("*",frm1)">
<input type="button" name=dvv value=" / "
OnClick="calc("/",frm1)">
</td></tr><tr><td>

Answer :<input type="text" name="ans" width=15>
</td>
</tr>
</table>
</form>

</body>
 
S

Sean Kinsey

I'm not able to use the values of text boxes. can anyone help me to do
so.

First of all, start with validating the HTML with eg http://validator.w3.org/
thank u.

<body text=white>

See http://www.w3.org/TR/html401/struct/global.html#h-7.5.1
The text attribute is deprecated.
        <form name="frm1">
        <h3>Mathematical Operations<h3>
        <table border=2 bgcolor=black cellpadding=10 name="tbl">
        <tr><td>
        Number  1:<input type="text" name="num1"width=15>

Missing space
        <br>
        Number  2:<input type="text" name="num2" width=15>
        </td></tr><tr><td>
        Operator :
        <input type="button" name=pls value="   +   "
OnClick="calc("+",frm1)">

The same quote mark used both around and in the attribute value of
OnClick, replace with eg. "calc('+',frm1)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top