首页 > js中url这样添加参数哪里错了?

js中url这样添加参数哪里错了?

**“excel” 是参数的值,这个excel需要用引号引起来吗?好像没法加引号呀

补充: excel是字符串,不是变量,type的值是字符串“excel”**


如果excel是java的变量,写法:

uploader: “<%= basePath %>Admin/Public/upload1.html?type=” + <%= excel%>

如果excel是JavaScript的变量,写法:

uploader: “<%= basePath %>Admin/Public/upload1.html?type=” + excel

修正:

“excel” 不是变量,是字符串?那

uploader: '<%= basePath %>Admin/Public/upload1.html?type=excel',

好了


像你的basePath那样用<%=excel%>

【热门文章】
【热门文章】