思路:把对象转换为字符串进行传递
function test(){ var objParam = {"key":"value"}; var strObj = JSON.stringify(objParam); p(strObj); } function p(obj){ }
参考:https://blog.csdn.net/shuai870081885/article/details/51283390