Input Type Password


ਇਹ ਵੀ ਇਕ ਸਿੰਗਲ ਲਾਈਨ ਟੈਕਸਟ ਇਨਪੁਟ ਕੰਟਰੋਲ ਹੈ।ਪਰ ਇਹ ਕੰਟਰੋਲ ਯੂਜ਼ਰ ਦੁਆਰਾ ਟੈਕਸਟ ਇਨਪੁਟ ਕਰਦੇ ਸਾਰੇ ਅੱਖਰਾਂ   ਉੱਪਰ ਮਾਰਕਿੰਗ ਕਰ ਦਿੰਦਾ ਹੈ (ਭਾਵ ਇਨਪੁਟ ਕੀਤਾ ਗਿਆ ਕੋਈ ਵੀ ਅੱਖਰ ਬਿੰਦੀਆ ਦੇ ਰੂਪ ਵਿੱਚ ਦਿਖਾਈ ਦੇਵੇਗਾ।ਇਸ ਲਈ ਇਸ ਕੰਟਰੋਲ ਦੀ ਵਰਤੋਂ ਵੈੱਬ ਪੇਜਾ ਵਿੱਚ ਪਾਸਵਰਡ ਆਦਿ ਸੁਰੱਖਿਅਤ ਜਾਣਕਾਰੀ ਨੂੰ ਸਵੀਕਾਰ ਕਰਨ ਲਈ ਕੀਤੀ ਜਾਂਦੀ ਹੈ।ਇਸ ਕੰਟਰੋਲ ਨੂੰ ਬਣਾਉਣ ਲਈ ਅਸੀ type="password"  ਐਟਰੀਬਿਊਟ ਦੇ ਨਾਲ < input> ਟੈਗ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹਾਂ। ਪਾਸਵਰਡ ਕੰਟਰੋਲ ਦੀ ਇਕ ਬੁਨਿਆਦੀ ਉਦਾਹਰਣ ਇਸ ਪ੍ਰਕਾਰ ਹੈ:
<Input Password:<input type="password">


ਇਹ ਕੋਡ ਪਾਸਵਰਡ ਜਾਣਕਾਰੀ ਨੂੰ ਸਵੀਕਾਰ ਕਰਨ ਲਈ ਇੱਕ ਟੈਕਸਟ ਫੀਲਡ ਬਣਾਉਂਦਾ ਹੈ। ਜਿਵੇਂ ਹੀ ਯੂਜਰ ਇਸ ਵਿਚ ਕੋਈ ਟੈਕਸਟ ਦਾਖਲ ਕਰੇਗਾ,ਇਹ ਇਨਪੁਟ ਅੱਖਰਾਂ ਨੂੰ ਮਾਸਕ ਕਰ ਦੇਵੇਗਾ।


ਇਹ ਕੰਟਰੋਲ ਵੀ name,size,maxlength ਅਤੇ value ਆਦਿ ਵਿਕਲਪਿਕ ਐਟਰੀਬਿਊਟਸ ਨੂੰ ਸਪੋਰਟ ਕਰਦਾ ਹੈ।

<input type="password"> defines a password field:


Live Demo & Try it yourself! Read More » »

Input Type Submit


<input type="submit"> defines a button for submitting form data to a form-handler.

The form-handler is typically a server page with a script for processing input data.

The form-handler is specified in the form's action attribute:


Live Demo & Try it yourself! Read More » »

Input Type Reset



Live Demo & Try it yourself! Read More » »

Input Type Radio


ਰੇਡੀਓ ਬਟਨ ਕੰਟਰੋਲ (Radio Button control): 

The <input type="radio"> defines a radio button.

Radio buttons let a user select ONE of a limited number of choices.

ਰੇਡੀਓ ਬਟਨ control ਦੀ ਵਰਤੋ ਉਹਨਾ ਸਥਿਤੀਆ ਵਿੱਚ ਕੀਤੀ ਜਾਂਦੀ ਹੈ ਜਿੱਥੇ ਅਸੀ ਯੂਜ਼ਰ ਦੁਆਰਾ ਇਨਪੁੱਟ ਕੀਤੇ ਗਏ ਮੁੱਲ ਨੂੰ ਇਕ ਬੂਲੀਅਨ ਮੁੱਲ ਵਜੋ ਸਵੀਕਾਰ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹਾਂ, ਜਾਂ ਅਸੀ ਕਈ ਆਪਸ਼ਨਾਂ ਵਿੱਚੋਂ ਸਿਰਫ ਇਕ ਇਨਪੁੱਟ ਦੀ ਹੀ ਉਮੀਦ  ਕਰਦੇ ਹਾਂ। ਸਾਧਾਰਣ ਸ਼ਬਦਾਂ ਵਿਚ ਅਸੀ ਕਹਿ ਸਕਦੇ ਹਾਂ ਕਿ ਰੇਡੀਓ ਬਟਨਾਂ ਦੀ ਵਰਤੋ ਆਪਸ਼ਨਾ ਦੇ ਦਿੱਤੇ ਸਮੂਹ ਵਿਚੋ ਕਿਸੇ ਇੱਕ ਆਪਸ਼ਨ ਦੀ ਚੋਣ ਕਰਨ ਲਈ ਕੀਤੀ ਜਾਂਦੀ  ਹੈ। ਰੇਡੀਓ ਬਟਨਾ ਦੀ ਵਰਤੋ ਆਮ ਤੌਰ ਤੇ ਲਿੰਗ (Gender) ਸੰਬੰਧੀ ਆਪਸ਼ਨਾ (Male/Female), ਕਰਮਚਾਰੀ ਦੀ ਕਿਸਮ (ਨਿਯਮਤ ਜਾਂ ਅਸਥਾਈ) ਆਦਿ ਦੀ ਸਿਲੈਕਸ਼ਨ ਕਰਵਾਉਣ ਲਈ ਕੀਤੀ ਜਾਂਦੀ ਹੈ। ਇਸ ਕੰਟਰੋਲ ਨੂੰ ਬਣਾਉਣ ਲਈ ਅਸੀਂ type="radio" ਐਟਰੀਬਿਊਟ  ਦੇ ਨਾਲ <input> ਟੈਗ ਦੀ ਵਰਤੋ ਕਰਦੇ ਹਾਂ। ਰੇਡੀਓ ਬਟਨ CONTROL ਦੀ ਬੁਨਿਆਦੀ ਉਦਾਹਰਣ ਇਸ ਪ੍ਰਕਾਰ ਹੈ:   
 Select Gender:<br> 
      <input type="radio" name="gender" value="Male">Male<br>
      <input type="radio" name="gender" value="female">female


    ਇਹ ਕੋਡ ਯੂਜ਼ਰ ਤੋ Gender ਦੇ ਮੁੱਲ ਦੀ ਸਿਲੈਕਸ਼ਨ ਕਰਵਾਉਣ ਲਈ ਦੋ ਰੇਡੀਓ ਬਟਨ ਬਣਾ ਰਿਹਾ ਹੈ। ਯੂਜ਼ਰ ਦਿੱਤੀਆ ਗਈਆ ਆਪਸ਼ਨਾ ਵਿੱਚੋ ਸਿਰਫ ਇਕ ਆਪਸ਼ਨ ਦੀ ਹੀ ਚੋਣ ਕਰ ਸਕਦਾ ਹੈ । ਸਰਵਰ ਸਾਈਡ ਸਕਿਰਪਟਿੰਗ ਜਿਵੇ ਕਿ JSP, ASP, PHP ਆਦਿ ਲਈ ਇਸ ਕੰਟਰੋਲ ਦੇ name ਐਟਰੀਬਿਊਟ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ ਤਾਂ ਜੋ ਸਿਲੈਕਟ ਕੀਤੇ ਗਏ ਰੇਡੀਓ ਬਟਨ ਦਾ ਮੁੱਲ ( valueਐਟਰੀਬਿਊਟ ਵਿਚ ਲਿਖ ਗਏ)  
 

ਰੇਡੀਓ ਬਟਨਾ ਦਾ ਇਕ ਗਰੁੱਪ ਬਣਾਉਣ  ਲਈ ਸਾਰੇ ਰੇਡੀਓ ਬਟਨਾ ਦਾ ਇਕ ਹੀ ਨਾਮ ਰੱਖਿਆ ਗਿਆ ਹੈ। 


D:/main/front.html
    radio button example         

select gender
○ Male
○ Female 
   ਯੂਜ਼ਰ ਦੁਆਰਾ ਸਿਲੈਕਸ਼ਨ ਕੀਤੇ ਜਾਣ ਤੋ ਬਾਅਦ 
 D./main/front.html 
radio  button example
select gender
○Male
○Female
 Radio Butto

The <input type="radio"> defines a radio button.

Radio buttons let a user select ONE of a limited number of choices.


Live Demo & Try it yourself! Read More » »

Input Type Checkbox


ਚੈਕਬਾਕਸ ਕੰਟਰੋਲ (ਚੈਕਬਾਕਸ ਕੰਟਰੋਲ):
ਚੈਕਬਾਕਸਮੈਨ ਯੂਜ਼ਰ ਨੂੰ ਸੀਮਿਤ ਆਪਸ਼ਨ ਵਿੱਚ ਜੀਰੋ ਜਾ ਵਧੇਰੇ  ਆਪਸ਼ਨਾ ਦੀ ਆਗਿਆ ਦਿੰਦਾ ਹੈ ਜਦੋ  ਸੰਭਾਵਿਤ ਇੰਪੁੱਟ  ਪਹਿਲਾ  ਤੋ ਹੀ  ਪਤਾ ਹੋਣ  ਤਾਂ  ਇਹ ਕੰਟਰੋਲ  ਡਾਟਾ  ਨੂੰ  ਸਵੀਕਾਰ  ਕਰਨ  ਦਾ  ਇਕ ਬਹੁਤ ਹੀ  ਸੁਵਿਧਾਜਨਕ ਤਰੀਕਾ  ਹੈ ਇਸ  ਕੰਟਰੋਲ  ਨੂੰ  ਬਣਾਉਣ  ਲਈ  ਅਸੀਂ  type="checkbox" ਐਟਰੀਬਿਊਟ ਦੇ  ਨਾਲ  <input> ਟੈਗ  ਦੀ  ਵਰਤੋ  ਕਰਦੇ ਹਾ ਯੂਜ਼ਰ ਦੀ ਅਪਸ਼ਨ  ਨੂੰ  ਸਵੀਕਾਰ  ਕਰਨ  ਲਈ  ਚੈੱਕਬੋਕ੍ਸ ਕੰਟਰੋਲ  ਦੀ  ਬੁਨਿਆਦੀ  ਉਦਹਾਰਣ  ਇਸ  ਪ੍ਰਕਾਰ  ਹੈ :
 

Select Your Subjects:<br>
<input type="radio"  name="cl" value="Chemistry">Chemistry<br>
<input type="radio" name="cl" value="Physics">Physics<br>
<input type="radio" name="cl" value="Math">Math<br>

ਇਹ  ਕੋਡ ਯੂਜ਼ਰ  ਤੋ ਵਿਸ਼ਿਆ ਦੀ  ਚੋਣ ਕਰਵਾਉਣ ਲਈ  ਤਿਨ  ਚੇਕਬੋਕ੍ਸ  ਬਣਾ  ਰਿਹਾ  ਹੈ  ਯੂਜ਼ਰਜ ਦਿਤੀਆਂ  ਗਈਆਂ  ਆਪਸ਼ਨਾ ਵਿਚੋ ਜੀਰੋ ਜਾਂ  ਵਧੇਰੇ  ਵਿਸ਼ਿਆਂ ਦੀ  ਚੋਣ  ਕਰ  ਸਕਦਾ ਹੈ  ਸਰਵਰ -ਸਾਈਡ ਸਕਰਿਪਟਿੰਗ  ਜਿਵੇਂ  ਕੇ  JSP , ASP , PHP ਆਦਿ  ਲਈ  ਇਸ  ਕੰਟਰੋਲ  ਦੇ  name ਐਟ੍ਰੀਬਿਊਟ  ਦੀ  ਲੋੜ  ਹੁੰਦੀ ਹੈ ਤਾਂ ਜੋ  select ਕੀਤੇ  ਹੋਏ   ਚੇਕਬੋਕ੍ਸਾ ਦੇ ਮੁੱਲ  ਪ੍ਰਾਪਤ  ਕੀਤੇ  ਜਾ  ਸਕਣ  ਚੇਕਬੋਕ੍ਸਾ ਦਾ  ਇਕ  ਗਰੁੱਪ  ਬਣਾਉਣ  ਲਈ  ਸਾਰੇ  ਚੇਕਬੋਕ੍ਸ  ਦਾ  ਇਕੋ  ਹੀ  ਨਾਮ ਰੱਖਿਆ  

<input type="checkbox"> defines a checkbox.

Checkboxes let a user select ZERO or MORE options of a limited number of choices.


Live Demo & Try it yourself! Read More » »

The value Attribute


The input value attribute specifies an initial value for an input field:


Live Demo & Try it yourself! Read More » »

The readonly Attribute


The input value attribute specifies an initial value for an input field:


Live Demo & Try it yourself! Read More » »

The disabled Attribute


The input disabled attribute specifies that an input field should be disabled.

A disabled input field is unusable and un-clickable.

The value of a disabled input field will not be sent when submitting the form!


Live Demo & Try it yourself! Read More » »

The size Attribute


The input size attribute specifies the visible width, in characters, of an input field.

The default value for size is 20.

Note: The size attribute works with the following input types: text, search, tel, url, email, and password.


Live Demo & Try it yourself! Read More » »

The maxlength Attribute


The input maxlength attribute specifies the maximum number of characters allowed in an input field.

Note: When a maxlength is set, the input field will not accept more than the specified number of characters. However, this attribute does not provide any feedback. So, if you want to alert the user, you must write JavaScript code.


Live Demo & Try it yourself! Read More » »

The multiple Attribute


The input multiple attribute specifies that the user is allowed to enter more than one value in an input field.

The multiple attribute works with the following input types: email, and file.


Live Demo & Try it yourself! Read More » »

The pattern Attribute


The input pattern attribute specifies a regular expression that the input field's value is checked against, when the form is submitted.

The pattern attribute works with the following input types: text, date, search, url, tel, email, and password.


Live Demo & Try it yourself! Read More » »

The placeholder Attribute


The input placeholder attribute specifies a short hint that describes the expected value of an input field (a sample value or a short description of the expected format).

The short hint is displayed in the input field before the user enters a value.

The placeholder attribute works with the following input types: text, search, url, tel, email, and password.


Live Demo & Try it yourself! Read More » »

The required Attribute


The input required attribute specifies that an input field must be filled out before submitting the form.

The required attribute works with the following input types: text, search, url, tel, email, password, date pickers, number, checkbox, radio, and file.


Live Demo & Try it yourself! Read More » »

The step Attribute


The input step attribute specifies the legal number intervals for an input field.

Example: if step="3", legal numbers could be -3, 0, 3, 6, etc.

Tip: This attribute can be used together with the max and min attributes to create a range of legal values.

The step attribute works with the following input types: number, range, date, datetime-local, month, time and week.


Live Demo & Try it yourself! Read More » »

The autofocus Attribute


The input autofocus attribute specifies that an input field should automatically get focus when the page loads.


Live Demo & Try it yourself! Read More » »