点击超链接后,以对话框的方式弹出,以下是核心代码
1.超链接的设置
< a href= "#portal_modal" id= "portal" title= "portal设置" data-type="ajax" data-url= "/portal/v_portal.do" data-moveable= "true" data-toggle= "modal" data-backdrop= "static" >2.弹出窗体的Div样式(与例子中给定的一样样的。)
< div class= "modal fade" id= "portal_modal" > < div class= "modal-dialog" > < div class= "modal-content" > < div class= "modal-header" > < button type= "button" class= "close" data-dismiss= "modal" > < span aria-hidden= "true" >× </ span > < span class= "sr-only" >关闭 </ span ></ button > < h4 class= "modal-title" >标题 </ h4 > </ div > < div class= "modal-body" > </ div > < div class= "modal-footer" > < button type= "button" class= "btn btn-default" data-dismiss= "modal" >关闭 </ button > < button type= "button" class= "btn btn-primary" >保存 </ button > </ div > </ div > </ div > </ div >
3.如果使用data-remote="超链接"会返回窗体要引用的数据,但是将弹出框的头给遮住。
4.如果使用data-type="ajax" data-url="超链接",弹出的框中窗体应用不到超链接返回的内容。
3.4 是怎么回事呢?
有完整的示例代码给一个可以吗?
正常情况下 data-remote 和 data-type=ajax|data-url 的作用是一样的,都是使用ajax从远程加载内容然后在对话框上显示。
不清楚你所说的具体问题是什么