Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/464.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript href向链接添加符号以防止其打开_Javascript_Jquery_Html_Href - Fatal编程技术网

Javascript href向链接添加符号以防止其打开

Javascript href向链接添加符号以防止其打开,javascript,jquery,html,href,Javascript,Jquery,Html,Href,我在html代码中有一个非常简单的href。当我尝试单击链接以确保其正常工作时,它会向链接添加符号并阻止其打开 假设代码是: <a href=“/home/readmore.html” > Read More &raquo</a> 单击该链接时,它将尝试将您发送到“home/home/readmore.html”而不是“/home/readmore.html” 我不太清楚发生了什么,因为这应该是一个直接的命令。将a标记从以下位置更改为: <a href

我在html代码中有一个非常简单的href。当我尝试单击链接以确保其正常工作时,它会向链接添加符号并阻止其打开

假设代码是:

<a href=“/home/readmore.html” > Read More &raquo</a>

单击该链接时,它将尝试将您发送到“home/home/readmore.html”而不是“/home/readmore.html”


我不太清楚发生了什么,因为这应该是一个直接的命令。

将a标记从以下位置更改为:

<a href=“/home/readmore.html” > Read More &raquo</a>

致:



仅使用单引号或双引号,HTML中不允许使用智能引号(当然内容除外)。你用的是哪种编辑器?我用的是Mac OS上的基本文本编辑器。但你是对的,不使用聪明的引语就成功了!谢谢
<a href="/home/readmore.html" > Read More &raquo</a>