编程知识 cdmana.com

JQuery special property operation

  • val Method :

effect : Used to set and get form elements ( example :input textarea ) Value

Parameter function :
1. When no parameters are passed , Is to get the value
2. When the parameter is passed in , It's the set value

  • html Methods and text Method

effect : html and text Can be used to set and retrieve content between elements ( namely : Can only be used for double label elements )
html:

text:

matters needing attention :
1. When the parameter is not passed in , To get the content between the elements . When parameters are passed in , This is setting content between elements .
2.html and text The difference between : html Method will recognize html label ,text Method takes the content directly as a string , It doesn't recognize html label

  • width Methods and height Method

width Method :
effect : Gets the width value of the first matching element style setting (px). stay jQuery 1.2 It can be used to obtain window and document The width of ( Be careful : The value obtained does not include the border width , Excluding the inner margin width , Excluding margin width )

版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢

Scroll to Top