Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Jquery 中有一个对象,我想将元素页面设置为 100,例如,我如何使用 jquery 来做到这一点?
var options = { valueNames: [ 'name', 'category' ], page: 3, plugins: [ [ 'paging' ] ] };
谢谢。
不需要 jQuery,因为它是一个 POJS 对象。假设您的意思是要在page创建对象后更改属性,这将起作用:
page
var options = { valueNames: [ 'name', 'category' ], page: 3, plugins: [ [ 'paging' ] ] }; options.page = 100;
您不需要 jQuery 来更改选项属性值。
options.page = 100;
http://jsfiddle.net/p6PNb/