href链接重定向到错误的地址,localhost

时间:2014-05-24 17:06:18

标签: javascript jquery html localhost href

我有href的问题,因为它重定向到本地

 var url = 'https://www.google.pl/';
 var txt = 'TEXT';
 $("#url-table" + " tr:last").after('<tr><td>' + index + '</td><td>' + '<a href="' + url + '">' + txt + '</a>'  + '</td></tr>');

我可以看到这个链接,但是在它上面叮当作响后,我会重定向到

  http://localhost:8080/%27%20+%20url%20+%20%27

如何解决?

0 个答案:

没有答案
相关问题