decodeURI,将URL中的中文转码,变为中文 var menuTitle =decodeURI( url.substring(url.lastIndexOf('?menuTitle=')+11,url.lastIndexOf('&url=')));