-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- val()不再强制设定value属性,而是使用标准HTMLElement.value= "value"来设定绝大部分控件。如需强制设定value属性则需要改用attr() - 现在val()可以批量设定属性了 - 当val()为获取模式时,一个元素直接返回值(和之前一样),多个元素则返回数组。如果你不确定选择的元素是否唯一,则需要自行判断(在获取值时选择器选择对象不唯一本来就是不规范的,除非特殊情况,例如要获取列表的所有选项的值) - attr()获取模式更改为与val()获取模式相同
- Loading branch information
Showing
3 changed files
with
113 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters