01.
<html>
02.
<head>
03.
<title>ThaiCreate.Com Tutorials</title>
04.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
06.
</head>
07.
<body>
08.
<input type=
"text"
id=
"txt1"
name=
"txt1"
><br />
09.
<input type=
"text"
id=
"txt2"
name=
"txt3"
><br />
10.
<input type=
"text"
id=
"txt3"
name=
"txt3"
><br />
11.
<input type=
"button"
name=
"btnSend"
id=
"btnSend"
value=
"Send"
disabled>
12.
13.
<script type=
"text/javascript"
>
14.
$(document).ready(
function
() {
15.
16.
$(
"input[type='text']"
).change(
function
() {
17.
$(
"#btnSend"
).prop(
"disabled"
,
false
);
18.
$(
"input[type='text']"
).each(
function
() {
19.
if
($(
this
).val() ==
""
)
20.
{
21.
alert(
'input : '
+ $(
this
).attr(
'id'
));
22.
$(
"#btnSend"
).prop(
"disabled"
,
true
);
23.
}
24.
});
25.
});
26.
27.
});
28.
</script>
29.
30.
</body>
31.
</html>