简体   繁体   English

为什么我的JS为链接添加前缀(localhost:3000 / mylink)?

[英]Why is my JS putting a prefix to my links (localhost:3000/mylink)?

My JS is putting a prefix to my links, and it shouldn't, because it's pure html + js. 我的JS给我的链接添加了前缀,不应该,因为它是纯html + js。

var source3 = 
'<img class="col-3 small-brand-avatar" src="assets/mimub.jpg" >'
+ '<div class="quarter_padding_left col-8">'
+ '<h5 class="medium">'
+ tooltipsInfo[2].name 
+ '</h5>'
+ '<span class="lightgray">de </span>'
+ '</span>'
+ tooltipsInfo[2].location
+ '</br>'
+ tooltipsInfo[2].price 
+ '<a href="​http://clk.tradedoubler.com">'
+ '<span class="green"> Mimub</span>'
+ '</a>'
+ '</br>'
+ '</div>';

When clicking in my link , the following URL is rendered: 单击我的链接时,将显示以下URL:

http://localhost:3000/http://clk.tradedoubler.com/

Thanks 谢谢

你有一个角色在你的代码(之间"http://... )并没有被编辑,让您的网址无效拿起重新输入。 a标签:

+ '<a href="http://clk.tradedoubler.com">'

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Node.JS:为什么我与 localhost:3000 的连接被拒绝? - Node.JS: Why is my connection to localhost:3000 refused? 为什么我的 localhost:3000 不起作用(错误 500) - Why does my localhost:3000 not work (error 500) 为什么我不能在localhost:3000上查看我的Express应用程序 - Why can I not view my express app on localhost:3000 为什么我的 localhost 链接中出现问号? https://localhost:3000/? - Why do I get a question mark in my localhost link? https://localhost:3000/? reactjs.env 将 localhost:3000 添加到我的 axios 路径 - reactjs .env add localhost:3000 to my axios path 将我的Office加载项发布到Azure时出现问题,Office.js未完全加载错误,但在localhost:3000上运行良好 - Problem publishing my Office Add-in to Azure, Office.js not fully loaded error, but works fine from localhost:3000 我的反应路线重定向到 localhost:3000 而不是它应该重定向到的页面 - My react route is redirecting to localhost:3000 and not the page it should redirect to 尝试从 localhost:8080 向 localhost:3000 发出 GET 请求,但我收到 cors 错误,并在我的 node.js 服务器上安装 cors 无法修复它 - Trying to make a GET request from localhost:8080 to localhost:3000 but I get a cors error, and installing cors on my node.js server doesn't fix it 为什么我的链接泄漏? - Why are my links leaking? JS:在我的页面中放置 2 个液体按钮而不是 1 个 - JS: putting 2 liquid buttons in my page instead of 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM