हिंदी

Use pattern attribute in <input> and see the Output.

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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1: Advanced Web Designing - Do it Yourself [पृष्ठ ३]

APPEARS IN

बालभारती Information Technology (Commerce) [English] Standard 12 Maharashtra State Board
अध्याय 1 Advanced Web Designing
Do it Yourself | Q 2. | पृष्ठ ३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×