开发者

jquery templating plugin - using a normal unnamed array?

开发者 https://www.devze.com 2023-02-03 10:41 出处:网络
Does anyone know if it\'s possible to just use a no开发者_JS百科rmal array (e.g. [1,2,3]) with the jQuery templating plugin?It won\'t work like you intended. Unless you\'re talking about an array of o

Does anyone know if it's possible to just use a no开发者_JS百科rmal array (e.g. [1,2,3]) with the jQuery templating plugin?


It won't work like you intended. Unless you're talking about an array of objects to iterate over in your template. But because like everything else in JavaScript, Array() returns an object, which means it's a valid parameter, but I don't think anything will output, since jQuery.tmpl probably checks if the given data object is an array.

0

精彩评论

暂无评论...
验证码 换一张
取 消