Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/426.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 隐藏多个<;部门>;在ajax加载的页面上,直到单击按钮为止_Javascript - Fatal编程技术网

Javascript 隐藏多个<;部门>;在ajax加载的页面上,直到单击按钮为止

Javascript 隐藏多个<;部门>;在ajax加载的页面上,直到单击按钮为止,javascript,Javascript,我已经看到类似的线程在这样 我有index.php按钮,点击url.php在index.php 在url.php上有两个。我希望它们中的一些只有在点击按钮后才可见。我找到了解决办法。 但只有1个div变为可见的rest hidded这是由于z-index属性造成的吗 index.php: <script> $("#load_url").click(function(){ $.ajax({ url:"url.php", success:funct

我已经看到类似的线程在这样

我有
index.php
按钮,点击
url.php
index.php

url.php
上有两个
。我希望它们中的一些只有在点击按钮后才可见。我找到了解决办法。 但只有1个div变为可见的rest hidded这是由于
z-index
属性造成的吗

index.php:

<script>
$("#load_url").click(function(){
    $.ajax({
        url:"url.php",
        success:function(response) {
            $("#view_port").html(response);
            $("#load_url").hide();
        }
    }); 
});

function show2() {
   //alert("hi");
    document.getElementById("txtHint").style.display = "block";
    document.getElementById("rateit99").style.display = "block";
    document.getElementById("cb1").style.display = "block";
}
</script>

$(“#加载url”)。单击(函数(){
$.ajax({
url:“url.php”,
成功:功能(响应){
$(“#查看端口”).html(响应);
$(“加载url”).hide();
}
}); 
});
函数show2(){
//警报(“hi”);
document.getElementById(“txtHint”).style.display=“block”;
document.getElementById(“rateit99”).style.display=“block”;
document.getElementById(“cb1”).style.display=“block”;
}
url.php

   <body style="height: 560px">

      <div class="rateit bigstars" id="rateit99"  style="z-index: 1; display:none;" ><b>Rate Me </b></label>
      </div>
     <label2 color="red" id="l1" style="z-index: 1; left: 438px; display:none; top: 180px; position:absolute" ><b><u>Add comment</u> </b></label2>

    <form action="data.php" method="POST" onsubmit="showUser(this, event)">
    <div style="z-index: 1; left: 420px; top: 40px; position: absolute; margin-top: 0px">           
    <label>Enter URL: <input type="text" id="t1" value="http://www.paulgraham.com/herd.html" name="sent" style="width: 400px; height:40px;" ></label><br/>
    </div>
    <div style="z-index: 1;" >  <button onclick="show2();"> Get Sentiment </button>         
    </div>
    </form>
    <div style="z-index: 1; left: 720px; top: 110px; position: absolute; margin-top: 0px">   
    </div>
    <h4>

   <div id="txtHint" align="justify" style="z-index: 3;  ">         </h4>
         </div>
<div class="fb-comments" id='cb1'"  ></div>
</div>
      </body>

评价我
添加注释
输入URL:
感情用事
这不是答案,但因为我不能评论-
事实上,这是因为css冲突。尝试在类中为display none提供所有这样的元素,然后像您这样应用直接样式。你也可以用!重要的是给予更高的优先权

您提供的标记中存在多个错误;例如-
第1行中的标记没有起始标记,只有结束标记,这一行中的引号不合适
你能告诉我吗?我听不懂你说的话!如果你能为你的问题提供一个JSFIDLE,我们可以更好地帮助你。如果你能复习的话!我做了很多调查。但无法找到从url.php到index.php的内容未加载的原因。可能有一些技术错误!