如题,如果链接是固定的常量,方法如下。document.getElementById('buy').innerHTML="<input type='button' value='立刻购买' class='buy' onclick='javascript:window.open(\"xxx.aspx\")'/>";现在如果目标链接\"xxx.aspx\"是动态读取的,是个变量的话,如何解决。我的办法是var address="xxx.aspx";document.getElementById('buy').innerHTML="<input type='button' value='立刻购买' class='buy' onclick='javascript:window.open(\"'"+ address +"'\")'/>";可是,这个方法却没达到预期的效果,不知道问题出在哪里。麻烦各位帮帮忙,非常感谢。