<html> <head> <title>ThaiCreate.Com Ajax Tutorial</title> </head> <script language="JavaScript"> function fncDisabled() { document.getElementById('txt1').disabled = true; document.getElementById('chk11').disabled = true; document.getElementById('rdo1').disabled = true; } function fncEnabled() { document.getElementById('txt1').disabled = false; document.getElementById('chk11').disabled = false; document.getElementById('rdo1').disabled = false; } </script> <body> <input type="text" name="txt1" id="txt1" value="my Text1"> <input type="checkbox" name="chk11" id="chk11" value="my Text2"> <input type="radio" name="rdo1" id="rdo1" value="my Text2"> <br> <input name="btnDisabled" id="btnDisabled" type="button" value="Disabled" onClick="JavaScript:fncDisabled();"> <input name="btnEnabled" id="btnEnabled" type="button" value="Enabled" onClick="JavaScript:fncEnabled();"> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท