jQuery.formJSON:从元素(例如表单)设置和获取 JSON

时间:2021-07-11 10:20:23
【文件属性】:
文件名称:jQuery.formJSON:从元素(例如表单)设置和获取 JSON
文件大小:7KB
文件格式:ZIP
更新时间:2021-07-11 10:20:23
JavaScript jQuery.formJSON 显然缩进现在都搞砸了,但使用它应该是这样的 获取表单的JSON对象: $('.element').formJSON("get"); 像这样设置表单值: $('.element').formJSON("set", { field : 'value' }); 请注意, .element可以是包含输入元素的任何内容,而不是必需的form 。 输入元素可以使用点符号或 PHP 的尖括号<input name="first.second" value="5" /> : <input name="first.second" value="5" />等价于<input name="first[second]" value="5" /> , 都应该返回{ first : { second : 5 } } 查看tests.html 以获取更多示例和数据类型等内容。
【文件预览】:
jQuery.formJSON-master
----tests.html(8KB)
----jquery.formJSON.d.ts(96B)
----LICENSE(1KB)
----readme.markdown(734B)
----jquery.formJSON.js(9KB)

网友评论