Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/415.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/3/html/69.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 不要转到其他页面,而是在模式中打开页面_Javascript_Html_Css_Ajax_Twitter Bootstrap - Fatal编程技术网

Javascript 不要转到其他页面,而是在模式中打开页面

Javascript 不要转到其他页面,而是在模式中打开页面,javascript,html,css,ajax,twitter-bootstrap,Javascript,Html,Css,Ajax,Twitter Bootstrap,我不确定这是否可行,但我想做的是,当用户单击一个按钮时,我希望新页面以一种模式打开,并在那里处于活动状态,而不是将用户带到另一个页面。我正在使用twitter引导。有可能吗 引导模式: <!-- Button trigger modal --> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"> Launch demo modal

我不确定这是否可行,但我想做的是,当用户单击一个按钮时,我希望新页面以一种模式打开,并在那里处于活动状态,而不是将用户带到另一个页面。我正在使用twitter引导。有可能吗

引导模式:

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

启动演示模式
情态标题
&时代;
...
接近
保存更改
我的链接:

<a href="{% url 'comment_new' post.id %}">hello</a> 


可能与@MoshFeu重复不一样,我在发布前看到过。这篇文章没有把它带到不同的页面,但是没有a href=“#”但是我在hrefSo中有一些链接,所以你想对链接做什么(
href
属性)?@MoshFeu将它发送到一个新页面我不确定我是否理解。当用户点击链接时,你想打开一个模式链接还是打开链接的页面?可能是@MoshFeu的副本不是同一个,我在发布前看到了。这篇文章没有把它带到不同的页面,但是没有a href=“#”但是我在hrefSo中有一些链接,所以你想对链接做什么(
href
属性)?@MoshFeu将它发送到一个新页面我不确定我是否理解。当用户单击链接时,您希望打开模式链接还是打开链接的页面?