encodeURI() 函数
1、定义和用法: 把字符串作为URI进行编码。
注意: 若URI中具有特殊含义的ASCII标点符号,函数不会进行转义;
比如,, / ? : @ & = + $ # ,但可使用encodeURIComponent()进行编码。
提示:使用decodeURI()可以解码URI。
encodeURI(uri) ; 参数必需。一个含有URI或其它要编码的文本字符串。
2、简单示例: encodeURI("BDceshi.html?username="+username+"&password="+password) ;
主要是页面跳转之间传参。
即,给BDceshi.html页面传入属性username和password,
其值分别为字符串username和password。
www.runoob.com/jsref/jsref-encodeuri.html