admin管理员组文章数量:1353289
var loc_array = document.location.href.split('/');
var linkElement = document.getElementById("waBackButton");
var newT = document.createTextNode(loc_array[loc_array.length-2]);
var repl = newT.replace('%20',' ');
linkElement.appendChild(repl);
Anyone know why this causes the text to not show up?
var loc_array = document.location.href.split('/');
var linkElement = document.getElementById("waBackButton");
var newT = document.createTextNode(loc_array[loc_array.length-2]);
var repl = newT.replace('%20',' ');
linkElement.appendChild(repl);
Anyone know why this causes the text to not show up?
Share Improve this question asked Jul 9, 2010 at 17:21 balexanderbalexander 24.5k14 gold badges47 silver badges68 bronze badges 01 Answer
Reset to default 9Why not just do
unescape(document.location.href);
本文标签: domJavascriptReplace 392039 spacesStack Overflow
版权声明:本文标题:dom - Javascript - Replace '%20' spaces - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743916979a2561389.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论