Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.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/6/entity-framework/4.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
Html 当链接处于';It’仍然在同一页上_Html - Fatal编程技术网

Html 当链接处于';It’仍然在同一页上

Html 当链接处于';It’仍然在同一页上,html,Html,我是网络开发的新手 如何在链接仍在同一页面上时使其处于禁用状态 这是我的密码 <a id="myb"class="navbar-brand scroll-top" href="#" onClick="parent.location='../index.php'">Pangitaa</a> 当我点击这个链接,我可以回到我的家。但当我点击它两次时,它将从我的文件夹项目中消失 我使用onClick函数也是因为href不起作用。我希望有人能帮助我。谢谢

我是网络开发的新手

如何在链接仍在同一页面上时使其处于禁用状态

这是我的密码

     <a id="myb"class="navbar-brand scroll-top" href="#" onClick="parent.location='../index.php'">Pangitaa</a>

当我点击这个链接,我可以回到我的家。但当我点击它两次时,它将从我的文件夹项目中消失

我使用onClick函数也是因为href不起作用。我希望有人能帮助我。谢谢


        <div id="brand">  </div>

        <script>    
        var url = window.location.href;             
        if(url!="http://localhost:8080/pangitaa/index.php"){
            $("#brand").html('<a id="logo"class="navbar-brand scroll-top"></a> <a id="myb"class="navbar-brand scroll-top" href="#" onClick="parent.location=\'../index.php\'">Pangitaa</a>');
        }else{
            $("#brand").html('<a id="logo"class="navbar-brand scroll-top"></a> <a id="myb"class="navbar-brand scroll-top" href="#">Pangitaa</a>')
        }

        </script>
var url=window.location.href; 如果(url!“http://localhost:8080/pangitaa/index.php"){ $(“#品牌”).html(“”); }否则{ $(“#品牌”).html(“”) }
if($\u SERVER['SERVER\u NAME']==“www.youdomain.com”){}else{}谢谢,但在jquery中是否有我可以做的事情?var url=window.location.href;如果(url!=“www.youdomain.com.index.php”){}其他{}我正在处理它。谢谢希望它能等一等。我有问题,我可以插入你的声明吗?我应该把它放在函数上吗?或者将此插入我的html div?谢谢您的帮助。但它不起作用。它复制了我的两个链接,并且已经在if语句中更改了url。这是我在div中的代码。这也是我在home中的url谢谢先生。成功了!但是我有一个问题,如果我想把我的url建立在我的根目录上,我怎么能改变它呢。你能简要介绍一下吗?我的意思是在这个if(url!=)代码中。我如何更改它。如果我要上传我的网站怎么办。如果(../index.php”),我还能这样做吗?