PHP Web Developer.

กรกฎาคม 20, 2012

Disabled/Enabled Textbox by radio button use jquery

Filed under: Javascript & jquery — Prajak @ 1:46 pm

======= Code =======
<script src=””></script&gt;
$(document).ready(function() {

// show Enabled textbox1

// show Disabled textbox1
$(“#textbox1”).attr(“disabled”, “disabled”);
<input type=”radio” name=”rad1″ id=”rad1Disabled” value=”0″ checked=”checked” /> Disabled
<input type=”radio” name=”rad1″ id=”rad1Enabled” value=”1″ /> Enabled
<input type=”text” id=”textbox1″ name=”textbox1″ disabled=”disabled” />
======= End Code =======


ให้ความเห็น »


RSS feed for comments on this post. TrackBack URI


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  เปลี่ยนแปลง )

Google photo

You are commenting using your Google account. Log Out /  เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out /  เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out /  เปลี่ยนแปลง )

Connecting to %s


%d bloggers like this: