当我访问网站时,我想让弹出窗口(模型表单)自动显示,我不知道代码中有什么问题 [英] I'm tring to make the popup (model form) automatically show when I visit a website , I dont know what are the problems in there in that code
本文介绍了当我访问网站时,我想让弹出窗口(模型表单)自动显示,我不知道代码中有什么问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的模态代码,我不知道为什么它不能正常工作
< div class = 模态淡入 id = overlay 样式 = padding-right:17px >
< div class = 模态对话框 >
< div < span class =code-attribute> class = modal-content >
< div class = modal-body >
< div class = modal-header >
×
×< / button >
< h3 class = modal-title > Blumen < / h3 >
< / div >
< p 样式 = text-居中对齐;填充:10px 0 0 0; font-size:13px > 请输入以下详细信息以获取详细的价格信息。 < / p >
< div class = row > ;
< div class = col-md-12 col-sm-6 col-xs-12 >
< div class = form-group >
< / div >
< / div < span class =code-keyword>>
< div class = col-md-12 col-sm-6 col-xs-12 >
< div class = form-group >
< / div >
< / div >
< div class = col-md-12 col-sm-6 col-xs-12 padd-15px >
< div class = form-group >
< / div >
< / div >
< div class = col-md-12 c ol-sm-6 col-xs-12 >
发送
< / div >
< / div >
< div class = clearfix > < / div >
< div class = 模态页脚 >
关闭
< / div >
< / div >
< / div >
< / div >
< / div >
我尝试了什么:
i想自动制作弹出模型当我访问网络时来。
我不知道该怎么办。
希望你能理解我。
解决方案
您可以添加JavaScript来执行此操作。
< script type = text / javascript>
( document )。ready( function (){
( #overlay)。modal(' 秀跨度>);
});
< / script>
这里通过将脚本添加到您发布的标记中的样子
Tryit Editor v3.5 [ ^ ]
这是一个例子:
https://www.tutorialrepublic.com /codelab.php?topic=faq&file=show-bootstrap-modal-on-page-load
This is my modal code i don't know why it's not work properly
<div class="modal fade in" id="overlay" style="padding-right: 17px">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
×
×</button >
<h3 class="modal-title">Blumen</h3>
</div>
<p style="text-align: center; padding: 10px 0 0 0; font-size: 13px">Please enter the details below to get the detailed pricing information.</p>
<div class="row">
<div class="col-md-12 col-sm-6 col-xs-12">
<div class="form-group">
</div>
</div>
<div class="col-md-12 col-sm-6 col-xs-12">
<div class="form-group">
</div>
</div>
<div class="col-md-12 col-sm-6 col-xs-12 padd-15px">
<div class="form-group">
</div>
</div>
<div class="col-md-12 col-sm-6 col-xs-12">
Send
</div>
</div>
<div class="clearfix"></div>
<div class="modal-footer">
Close
</div>
</div>
</div>
</div>
</div>
What I have tried:
i want to make popup model automatically come when i visit a web.
I don't know how can i do.
Hope you can understand me.
解决方案
You can add a JavaScript to do so.
<script type="text/javascript">
(document).ready(function(){
("#overlay").modal('show'); }); </script>
Here how it look like by adding the script to your posted markup
Tryit Editor v3.5[^]
Here is an example:
https://www.tutorialrepublic.com/codelab.php?topic=faq&file=show-bootstrap-modal-on-page-load
这篇关于当我访问网站时,我想让弹出窗口(模型表单)自动显示,我不知道代码中有什么问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文