Advertisements
Advertisements
प्रश्न
Use pattern attribute in <input> and see the Output.
कोड लेखन
आकृती
Advertisements
उत्तर
<form action="/submit-data">
<label for="code">Country Code:</label>
<input
type="text"
id="code"
name="code"
pattern="[A-Za-z]{3}"
title="Must be exactly 3 letters (e.g., IND, USA)"
required
>
<button type="submit">Submit</button>
</form>
Output:
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
