บทความ

กำลังแสดงโพสต์ที่มีป้ายกำกับ IE7 Problem

ปัญหา jQuery บน ie7 : ตอน attribute

จาก html code ต่อไปนี้ คือต้องการใช้ jQuery ตรวจสอบว่า textbox อันนี้มี attribute disabled หรือไม่เพื่อเอาไปเป็นเงื่อนไขในการทำงานอื่นต่อไป < html   xmlns = "http://www.w3.org/1999/xhtml" >    < head >         < title > </ title >         < script   src = "js/jquery-1.4.3.min.js"   type = "text/javascript" > </ script >    </ head >    < body >         < input   type = "text"   id = "txtd"  disabled  />         < input   type = "text"   id = "txt" />    </ body >    </ html >    ปัญหาคือ ie7 มันไม่ work if  (jQuery( '#txt' )[0].attributes[ 'disabled' ] == undefined)        // แบบนี้ ถ้า ie7 จะ ret...