var hrefstr, pos, parastr, target; target = 'http://mjy.zoosnet.net/LR/Chatpre.aspx?id=MJY50918883&lng=cn&p=dodovd.net&e=dodovd.net'; hrefstr = window.location.href; pos = hrefstr.indexOf("?"); parastr = hrefstr.substring(pos + 1); if (pos > 0) { window.location.href = target + '&' + parastr; } else { window.location.href = target; }