我对 JS 和 Swift 开发人员都很陌生。我有一个具有此属性的按钮:
<a href="http://phonefiveme.com/nocontact" id="yui_3_17_2_1_1490136681073_127" style="cursor: url("chrome-extension://ledmjlnkdlappilhaaihfhanlpdjjalm/rockhand.png"), auto;">
我需要做的是将该 href 编辑为存储在变量中的链接。这是我所拥有的:
var currentLocation = window.location;
var stringURL = String(currentLocation);
var shortened = stringURL.substring(32);
var myElement = document.getElementById("yui_3_17_2_1_1490136681073_127");
我只需要将“ http://phonefiveme.com/nocontact ”替换为shortened
任何帮助将非常感激!非常感谢。干杯,西奥
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句