Sunday, 22 May 2011

Learn PHP online : PHP Day-31

Input Type Text button Radio using HTML

                                     

Input: Input is a tag used to display the input controls on the webpage.
Type: Type is an attribute to provide the type of the control.

Type=text> Displays the text box on the webpage.
<html>
<input type="text" dir="ltr" maxlength="15" value="Search in DanPHP" style="color:red">
</html>
Save this film with .html extension.

Type=button> It displays the button control on the webpage.
<input type="button" value="show" onClick="img1.style.visibility= 'visible'">
<input type="button" value="hide" onClick="img1.style.visibility= 'hidden'">
<br>
<img src="1.jpg" width="578" id="img1">

Type=Radio> Displays the radio button on webpage.
<input type="radio" name="rad" checked= onClick="txt1.disabled= false; txt2.disabled= true">ALT Email Id : <input type="text" id="txt1".value= 'ALT email" onClick= 'value= Dinesh ">
<br>
<input type="radio" name="rad1" onClick="txt2.disabled= false; txt1.disabled= true">SEC QST : <input type="text" id="txt2".value= "SEC QSN" disable>



Type = Password : It displays the password control on the webpage.

Type=File: It displays the file upload control on the webpage.
Type=Submit: By using this control we can submit the web page to the server. If you want to transfer the page values to the web server, we are using submit button.
Sample Script:
<input type="file">
<br>
<input type="password">
<input type="checkbox" checked="checked">Dinesh
<input type="checkbox" checked="checked">Dilip
<input type="submit" value="Login">
Save this file with .html.

No comments:

Post a Comment

Visual comparison of the two methods, creating a simple table.

Option 1, using PHP: // PHP $html = '<table>' ;     foreach ( $data as $row ) {     $html .= '<tr>...