当我单击导航栏或其他按钮中的按钮时,它会将我重定向到名为的页面undefined,但我想做的是打开引导模式进一步解释一下,我在页面上创建了一个按钮,当我将元素放入按钮内时,它会重定向到未定义的页面,我什至在那里<a>没有引用。href<!--button--><button class="au-btn au-btn-icon au-btn--blue"> <a data-toggle="modal" data-target="#uploadModal"><i class="zmdi zmdi-plus"></i>Adicionar Item</a></button><!--Modal--><div class="modal fade" id="uploadModal" tabindex="-1" role="dialog" aria-labelledby="myMediulModalLabel"> <div class="modal-dialog modal-md"> <div style="color:white;background-color:#008CBA" class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h2 style="color:white" class="modal-title" id="myModalLabel">Upload Items</h2> </div> <div class="modal-body"> <form enctype="multipart/form-data" method="post" action="additems.php"> <fieldset> <p>Name of Item:</p> <div class="form-group"> <input class="form-control" placeholder="Name of Item" name="item_name" type="text" required> </div> <p>Price:</p> <div class="form-group"> <input id="priceinput" class="form-control" placeholder="Price" name="item_price" type="text" required> </div> <p>Choose Image:</p> <div class="form-group"> <input class="form-control" type="file" name="item_image" accept="image/*" required/> </div> </fieldset> </div> <div class="modal-footer"> <button class="btn btn-success btn-md" name="item_save">Save</button> <button type="button" class="btn btn-danger btn-md" data-dismiss="modal">Cancel</button> </form> </div> </div> </div></div>
1 回答
月关宝盒
TA贡献1772条经验 获得超5个赞
为什么按钮内需要锚点。这就是它不起作用的原因:-
只需更换
<button class="au-btn au-btn-icon au-btn--blue"> <a data-toggle="modal" data-target="#uploadModal"><i class="zmdi zmdi-plus"></i>Adicionar Item</a></button>
和
<button class="au-btn au-btn-icon au-btn--blue" data-toggle="modal" data-target="#uploadModal"> <i class="zmdi zmdi-plus"></i>Adicionar Item</button>
- 1 回答
- 0 关注
- 70 浏览
添加回答
举报
0/150
提交
取消