js代码:
<script language="JScript" runat="Server">
function toObject(json) {
    eval("var o=" + json);
    return o;
}
</script>asp代码:
<%Dim json
json = "{'uid':'tian','username':'abc','email':'[email protected]'}"
Set json2 = toObject(json)%>
如果是直接传递json字符窜变量,这个很简单,我已经实现了了;
现在我想传递json2对象,该怎样传递?在js文件里又该怎样接收?问题:怎样把json2对象变量传递给js文件?
我是这样处理的,如下:
<script  type="text/javascript"   src="testJs.js?json=<%=json2%>></script>
但是在js文件里该怎样接收这个json2对象变量?