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 2008年6月,2009年在编码 ,JavaScript的与阿贾克斯 德拉戈什
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.因为没有名字,身份证,阶级,样式或所有权的财产。 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:以下是分区属性列表:
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中发现的新的可能性!
Related posts:相关岗位:
- JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript的:如何获取指数(位置在一组与jQuery对象)?
- JavaScript: Get anchor from URL JavaScript的:从网址锚
- JavaScript: Send function as a parameter to another function (callbacks) JavaScript的:寄另一个函数(回调参数功能)
- Javascript: How to validate email address with JavaScript? JavaScript的:如何用JavaScript验证电子邮件地址?
- PHP: Get all files and folders from a directory (folder) PHP的:获取所有从一个目录(文件夹的文件和文件夹)













































