gpt4 book ai didi

javascript - 如何添加样式表到确认框?

转载 作者:行者123 更新时间:2023-11-28 06:56:42 25 4
gpt4 key购买 nike

<button type="submit" class="btn btn-default btn-sm" onclick="return confirm('Are you sure?')"> 
<span class="glyphicon glyphicon-trash"></span>
</button>

我想附上这个<div class="box box-solid box-success">...</div>代码到我的确认框。我尝试了多种方法但没有成功。我使用 Laravel 5 和 Blade 模板编写此代码。

plz,这个问题是不同的,因为我曾经编写larave 5 php框架。我使用blade模板格式。所以,我使用了这样的语法。

 <p id='buttons'>
{!! Form::submit('Update', ['class' => 'btn btn-primary','onclick'=>'return confirm("Are you sure?")']) !!} &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
{!! Form::button('Cancel', ['class' => 'btn btn-default']) !!}

</p>

最佳答案

如果你正在使用 bootstrap,我更喜欢你应该使用 bootstrap 的 Modal http://getbootstrap.com/javascript/#modals

或者如果你想轻松使用bootstrap的modal,你可以使用bootbox: http://bootboxjs.com/

它有关于如何在示例中使用确认模式的示例

关于javascript - 如何添加样式表到确认框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32515471/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com