01.
<html>
02.
<head>
03.
<script type=
"text/javascript"
>
04.
function
show_alert()
05.
function
openpany()
06.
{
07.
document.getElementById(
'company'
).disabled = false;
08.
}
09.
function
offpany()
10.
{
11.
document.getElementById(
'company'
).disabled = true;
12.
document.getElementById(
'company'
).value =
""
;
13.
}
14.
</script>
15.
</script>
16.
</head>
17.
<body>
18.
19.
<input name=
"choice"
type=
"radio"
id=
"radio"
value=
"เลือก1"
onchange=
"offpany();"
/> เลือก1<br />
20.
<input name=
"choice"
type=
"radio"
id=
"radio"
value=
" เลือก2"
onchange=
"openpany();"
/>
21.
เลือก2 (กรอกชื่อข้อมูล)<br />
22.
<input name=
"company"
type=
"text"
disabled=
"disabled"
id=
"company"
value=
""
size=
"50"
/>
23.
24.
</body>
25.
</html>