想要用js实现当前面的为不同的信息时跳转不同的界面

想要用js实现当地区不同时进行不同的链接的跳转应该怎么写呢

image.png

1-6_js判断点击跳转不同模板--testV1.cpt

FineReport LClulala 发布于 2021-4-5 16:13
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共4回答
最佳回答
1
snrtuemcLv8专家互助
发布于2021-4-6 08:39

1617610425703616.cpt

你的代码有问题哦,改成下面的

if (a == "华北") {

var url = FR.cjkEncode("https://www.baidu.com/");

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

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

var o = {

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

width: 680, //宽度

height: 640, //高度

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

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

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

};

//弹出窗体

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

} else if (a == "华东") {

var url = FR.cjkEncode("https://help.fanruan.com");

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

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

var o = {

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

width: 680, //宽度

height: 640, //高度

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

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

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

};

//弹出窗体

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

}

最佳回答
0
shirokoLv6资深互助
发布于2021-4-6 08:30

https://help.fanruan.com/finereport/doc-view-1712.html?source=4

根据超级链接的内容跳转不同页面
最佳回答
0
luojian0323Lv7资深互助
发布于2021-4-6 08:32
window.form = this.options.form; //把参数界面的form赋值给全局变量 var location = this.options.location;  //获取当前控件的位置 var k = FR.cellStr2ColumnRow(location); var co=k.col-1 var ro=k.row var diqu=contentPane.getCellValue(co,ro) if(diqu=="华东"){  window.location.href = "报表链接路径1";  } else if (diqu=="华北"){ window.location.href = "报表链接路径2"; } else if (diqu=="沈阳"){ window.location.href = "报表链接路径3"; }

最佳回答
0
kaqiyuLv6初级互助
发布于2021-4-6 08:57(编辑于 2021-4-6 08:58)

https://help.fanruan.com/finereport/doc-view-1942.html    根据图表分类或系列超链到不同报表

https://help.fanruan.com/finereport/doc-view-1696.html    图表超链到网络报表

参考这两个文档,其中有一个是我补充的内容,有问题可以再问

JS都是一样去写

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