Today I have learned javascript lable and dropdown

 labeled statement is any statement that is prefixed with an identifier. You can jump to this label using a break or continue statement nested within the labeled statement.

A JavaScript statement. break can be used within any labeled statement, and continue can be used within labeled looping statements.

You can use a label to identify a statement, and later refer to it using a break or continue statement. Note that JavaScript has no goto statement; you can only use labels with break or continue.

Any break or continue that references label must be contained within the statement that's labeled by label. Think about label as a variable that's only available in the scope of statement.

We have styled the dropdown button with a background-color, padding, hover effect, etc.

The .dropdown class uses position:relative, which is needed when we want the dropdown content to be placed right below the dropdown button (using position:absolute).

The .dropdown-content class holds the actual dropdown menu. It is hidden by default, and will be displayed on hover (see below). Note the min-width is set to 160px. Feel free to change this. Tip: If you want the width of the dropdown content to be as wide as the dropdown button, set the width to 100% (and overflow:auto to enable scroll on small screens).

Instead of using a border, we have used the box-shadow property to make the dropdown menu look like a "card". We also use z-index to place the dropdown in front of other elements.


 <label><input type="radio"  /> male</label>
        <label><input type="radio"   /> female</label>
        <label><input type="radio"  /> others</label>
        <label><input type="checkbox"  /> name</label>
        <label><input type="checkbox"  /> mobilenumber</label>
        <br></br>
        <br></br>
        <label>Choose a subject:</label>
        <select name="subject" id="subject">
  <option>tamil</option>
  <option >english</option>
  <option >chemistry</option>
  <option>maths</option>
  <option >physics</option>
  <option >c language</option>
</select>
output

Comments

Popular posts from this blog

Building a Full-Stack Student Management System with React.js and NestJS

Today I have solved the problem in javascript

Today I have solved problem in javascript