自定义js弹窗如何只保留确定按钮

 image.png

var w=600;//自己调整

var h=400;//自己调整

var url = encodeURI("/webroot/decision/view/report?viewlet=Form21557.frm");

//窗体

var $iframe = $("

//将窗体的src属性设置为模板路径

$iframe.attr("src", url);

//窗体的属性

var o = {    

title: "提示",  //标题   

 width: w,   //宽度    

  height: h, //高度 

closable:false,//是否显示关闭按钮,默认true,如果改为false就不显示关闭按钮了   

confirm:true     //是否添加确认取消按钮,默认false

 };

//弹出窗体

FR.showDialog(o.title, o.width, o.height, $iframe, o);

FineReport 用户52076492 发布于 2022-11-9 09:50 (编辑于 2022-11-9 09:55)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
0
CD20160914Lv8专家互助
发布于2023-5-20 16:56

因为你把那个确认与取消的按钮打开了,用css的方式去消除掉

var w=500;//

var h=400;//

var url = encodeURI("/webroot/decision/view/report?viewlet=test.frm");

//窗体

var $iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='no' frameborder='0'>");

//将窗体的src属性设置为模板路径

$iframe.attr("src", url);

//窗体的属性

var o = {    

title: "我是对话框",  //标题   

 width: w,   //宽度    

  height: h, //高度

  confirm:true     //是否添加确认取消按钮,默认false  

 };

//弹出窗体

FR.showDialog(o.title, o.width, o.height, $iframe, o);

$(".fr-core-btn.ui-state-enabled.fr-core-btn-style-gray",parent.document).remove();//删除取消按钮

只有确定按钮。没有取消按钮了

image.png

最佳回答
0
用户k6280494Lv6资深互助
发布于2022-11-9 09:52(编辑于 2023-5-20 16:58)

参考 https://bbs.fanruan.com/wenda/question/127683.html

var url="/webroot/decision/view/report?viewlet=GettingStarted.cpt&op=write";

var url = FR.cjkEncode(url);

//窗体

var $iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='no' frameborder='0'>");

//将窗体的src属性设置为模板路径

$iframe.attr("src", url);

//窗体的属性

var o = {

    title: "对话框",    //标题

    width: 680,         //宽度,可以换成w/2,自适应

    height: 640,        //高度

    //closable:true,    //是否显示关闭按钮,默认true

    //confirm:true,     //是否添加确认取消按钮,默认false

    //draggable:true   //是否可拖动,默认true

};

//弹出窗体

FR.showDialog(o.title, o.width, o.height, $iframe, o);

最佳回答
0
congerLv6高级互助
发布于2022-11-9 09:57

试试msg呗

https://help.fanruan.com/finereport/doc-view-603.html

不要内容,内容写空字符串

2021-09-22_10-04-51.gif

  • 4关注人数
  • 380浏览人数
  • 最后回答于:2023-5-20 16:58
    请选择关闭问题的原因
    确定 取消
    返回顶部