Stringsetting.async.contentType

概述[ 依赖 jquery.ztree.core 核心 js ]

Ajax 提交参数的数据类型。[setting.async.enable = true 时生效]

默认值:"application/x-www-form-urlencoded"

String 格式说明

contentType = "application/x-www-form-urlencoded" 可以满足绝大部分请求,按照标准的 Form 格式提交参数

contentType = "application/json" 可以满足 .Net 的编程需要,按照 JSON 格式提交参数

setting 举例

1. 设置 Ajax 提交参数的数据类型为 JSON 格式

var setting = {
	async: {
		enable: true,
		contentType: "application/json",
		url: "http://host/getNode.php",
		autoParam: ["id", "name"]
	}
};
......