This is a translated page. The original can be found here: http://iwebdevel.com/2009/06/08/javascript-where-do-i-find-all-properties-for-all-html-elements/
UPDATES VIA RSS | Email การปรับปรุงผ่านทาง RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / JavaScript & Ajax / JavaScript: Where do I Find … บ้าน / รหัส / JavaScript และ Ajax / JavaScript: ฉันจะหาที่ไหน ...

JavaScript: Where do I Find All Properties for All HTML Elements ? JavaScript: ฉันจะหาคุณสมบัติทั้งหมดสำหรับทุกองค์ประกอบ HTML ที่ไหน

Posted on 08. โพสต์ใน 08. Jun, 2009 by Dragos in Coding , JavaScript & Ajax มิ.ย., 2,009 โดย Dragos ใน การเข้ารหัส, JavaScript และ Ajax

You think you're good at JavaScript? คุณคิดว่าคุณเก่ง JavaScript? Ok. ตกลง. Here's a question that'll test your JavaScript wisdom: How many properties does a DIV element have? นี่เป็นคำถามที่จะทดสอบปัญญา JavaScript ของคุณ: วิธีคุณสมบัติหลายองค์ประกอบ div ไม่ได้?

Your answer is 5? คำตอบของคุณ 5? Because there is the name, id, class, style or title property. เนื่องจากมี ชื่อ id, ชั้นสไตล์ หรือทรัพย์สิน title. Maybe your answer is a little bit more than 5, but would you be surprised if I told you that there are more than 60 properties for the div element (62 in total, I think)? อาจเป็นคำตอบของคุณหน่อยมากกว่า 5 แต่จะคุณจะประหลาดใจถ้าฉันบอกคุณว่ามีกว่า 60 คุณสมบัติสำหรับองค์ประกอบ div (62 ในทั้งหมดผมคิด) Don't worry, me too I was surprised when I found out about it. อย่ากังวลฉันเกินไปฉันรู้สึกประหลาดใจเมื่อพบเกี่ยวกับ. And all these properties are there to help you better interact with your element and with the client. และคุณสมบัติทั้งหมดเหล่านี้มีเพื่อช่วยให้คุณดีขึ้นโต้ตอบกับองค์ประกอบและกับลูกค้าของคุณ.

Here's a list of div properties: นี่รายการของคุณสมบัติ div ของ:

Div properties

Div properties คุณสมบัติ div

I was talking about the div element, but the other elements do also have dozens of properties that you might never heard of before. ฉันถูกพูดถึงองค์ประกอบ div แต่องค์ประกอบอื่นๆยังมีนับสิบคุณสมบัติที่คุณอาจไม่เคยได้ยินมาก่อน. Find all properties for the elements you're interested in at Java2s.com . พบคุณสมบัติทั้งหมดสำหรับองค์ประกอบที่คุณสนใจที่ Java2s.com. Good luck discovering the new possibilities of JavaScript! โชคดีพบความเป็นไปได้ใหม่ของ JavaScript!

Translate this post แปลบทความนี้


Related posts: บทความที่เกี่ยวข้อง:

  1. JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: วิธีการรับดัชนี (ตำแหน่งภายในกลุ่ม) ของวัตถุด้วย jQuery?
  2. JavaScript: Get anchor from URL JavaScript: Get ทอดสมอจาก URL
  3. JavaScript: Send function as a parameter to another function (callbacks) JavaScript: ส่งหน้าที่เป็นพารามิเตอร์ทำงาน (callbacks อื่น)
  4. Javascript: How to validate email address with JavaScript? Javascript: การตรวจสอบที่อยู่อีเมลด้วย JavaScript?
  5. PHP: Get all files and folders from a directory (folder) PHP: ดูไฟล์และโฟลเดอร์ทั้งหมดจาก directory (โฟลเดอร์)

    blog comments powered by Disqus บล็อกความคิดเห็นขับเคลื่อนโดย Disqus