मराठी
महाराष्ट्र राज्य शिक्षण मंडळएचएससी वाणिज्य (इंग्रजी माध्यम) इयत्ता १२ वी

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×