作者:卡吉米国际早教_763 | 来源:互联网 | 2023-05-17 11:51
I've got a page with several iframes that are added by the end user via a cms. I need to append a query string (exactly the same to all iframes) to the end of the iframe source and am stuck on how to proceed.
我有一个页面,其中包含几个由最终用户通过cms添加的iframe。我需要将一个查询字符串(与所有iframe完全相同)附加到iframe源的末尾,并且我仍然坚持如何继续。
My current code is here where .frame-wrap is a container around all iframes:
我目前的代码在这里.frame-wrap是围绕所有iframe的容器:
$(document).ready(function() {
var hideLinkHeader = '?hideLink=true&hideHeader=true';
var url = cannot figure out how to set this for each iframe
$('.frame-wrap').find('iframe').attr('src', url + hideLinkHeader);
});
Any help is greatly appreciated.
任何帮助是极大的赞赏。
1 个解决方案