传递页面URL写法 例如: href="./teacher.html?id="+id+"&course="+encodeURI(course)+"&grade="+encodeURI(grade) 其中id为数字,course、grade为中文,使用encodeURI()包括 参数接收页面 var Ohref=decodeURI(decodeURI(window.location.href)); 因为传过来的URL里面有两个encodeURI,所以在接收时该URL要用decodeURI解码两次