HTML INPUT ATTRIBUTES
value attributes:
value attributes மூலம் ஆரம்ப மதிப்பை கொடுக்க பயன்படுகிறது.
Value Attributes
<html>
<head>
</head>
<body>
<h2>The value Attribute</h2>
<form action="">
பெயர்:<br>
<input type="text" name="name" value="சங்கீதா">
</form>
</body>
</html>
OUTPUT
Required Attribute
<html>
<head>
</head>
<body>
<h2>The required Attribute</h2>
<form action="page.php">
அம்மா பெயர்: <input type="text" name="amma" required><br>
<input type="submit">
</form>
</body>
</html>
OUTPUT
readonly attributes:
readonly attributes மூலம் input field-இல் உள்ள மதிப்பினை பார்க்கவும் வாசிக்கவும் மட்டுமே முடியும்.அதனை மாற்ற முடியாது.
Readonly Attribute
<html>
<head>
</head>
<body>
<h2>The Readonly Attribute</h2>
<form action="">
பெயர்:<br>
<input type="text" name="name" value="சங்கீதா" readonly>
</form>
</body>
</html>
OUTPUT
Placeholder Attribute
<html>
<head>
</head>
<body>
<h2>The placeholder Attribute</h2>
<form action="page.php">
<input type="text" name="amma" placeholder="அம்மா பெயர்"><br>
<input type="text" name="appa" placeholder="அப்பா பெயர்"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
OUTPUT
maxlength attributes:
maxlength="5" என்று கொடுத்ததால் 5 எழுத்துக்களுக்கு மேல் கொடுக்க முடியாது.
Max Length Attribute
<html>
<head>
</head>
<body>
<h2>The Max Length Attribute</h2>
<form action="">
பெயர்:<br>
<input type="text" name="name" maxlength="7">
</form>
</body>
</html>
OUTPUT
disabled attributes:
disabled attributes பயன்படுத்துவதன் மூலம் input field ஆனது பயன்படுத்த முடியாது மற்றும் கிளிக் செய்ய முடியாது.
Disabled Attribute
<html>
<head>
</head>
<body>
<h2>The Disabled Attribute</h2>
<form action="">
பெயர்:<br>
<input type="text" name="name" value="ராஜ்" disabled>
</form>
</body>
</html>
OUTPUT
autofocus attributes:
autofocus attributes கொடுக்கப்பட்ட input field ஆனது page load ஆகும் போது தானாகவே autofocus கொடுக்கப்பட்ட field-க்கு கவனம் செலுத்தப்படும்.
Autofocus Attribute
<html>
<head>
</head>
<body>
<h2>The autofocus Attribute</h2>
<form action="page.php">
அம்மா பெயர் :<input type="text" name="amma" ><br>
அப்பா பெயர்: <input type="text" name="appa"><br>
அண்ணன் பெயர் :<input type="text" name="brother" autofocus><br>
<input type="submit">
</form>
</body>
</html>
OUTPUT
autocomplete attributes:
autocomplete attributes-க்கு மதிப்பு இரண்டு வழிகளில் கொடுக்க முடியும்.ஒன்று on மறறொன்று off.
autocomplete on செய்யப்பட்டிருந்தால் பயனர் input field-யை கிளிக் செய்யும் போது இதற்கு முன்பு கொடுக்கப்பட்ட அனைத்து மதிப்புகளும் காண்ப்பிக்கப்படும்.
ex:
உங்கள் கணிப்பொறியில் நீங்கள் gmail-யை open செய்கிறீர்கள்.open செய்யப்பட்ட website-இல் user name input field-யை கிளிக் செய்யும் போது இதற்கு முன்பு நீங்கள் கொடுத்த gmail,உங்கள் நண்பன் கொடுத்த gmail இப்படி முன்பு கொடுக்கப்பட்ட அனைத்து mail address-களும் காண்ப்பிக்கப்படும்.இதுவே autocompelete work ஆகும்.
autocomelete attributes ஆனது <form> மற்றும் <input> வகையை சேர்ந்த text,search,url,tel,email,password,datepicker,range and color போன்றவற்றுடன் சேர்ந்து செயல்படுகிறது.
Autocompelete Attribute
<html>
<head>
</head>
<body>
<h2>The Autocomplete Attribute</h2>
<form action="script.php" autocomplete="on">
பெயர்:<input type="text" name="name"><br>
ஈமெயில்: <input type="email" name="email" autocomplete="off"><br>
<input type="submit">
</form>
</body>
</html>
No comments:
Post a Comment