js直接修改url
=
window.history.pushState(‘’,’’,’/blog/<%= params[:tag]%>’);
最后一个参数是url 相对路径
alert出所有的js error
=
window.onerror = function myErrorHandler(errorMsg, url, lineNumber) {
alert(“Error occured: “ + errorMsg);//or any message
return false;
}