Jump to content

Disable Certain Input Boxes With Javascript


Recommended Posts

I'd like to disable certain input boxes, but without changing the HTML code manually. For example:I'd like to disable the input boxes with the following id's:id="first_field"id="fourth_field"id="sixth_field"

  <div>	<form action="">	  <fieldset>		<input type="text" id="first_field"/>		<input type="text" id="second_field"/>		<input type="text" id="third_field"/>		<input type="text" id="fourth_field"/>		<input type="text" id="fifth_field"/>		<input type="text" id="sixth_field"/>	  </fieldset>	</form>  </div>

Anyone know a Javascript that can do this?

Link to post
Share on other sites

is there any reason you can't take anything you've been taught herehttp://w3schools.invisionzone.com/index.php?showtopic=44954 to at least make an attempt on your own first?

Link to post
Share on other sites

thescientist does have a point. It's important that original posters demonstrate more diligence than they frequently do and not be surprised when a responder indicates that the OP should/might know better, might be dallying, or both.

Edited by niche
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...