1

我有一个链接

<a class="modal" rel="{handler: 'iframe', size: {x: 500, y: 400}}" href="http://localhost/site/index.php">Site</a>

在灯箱中打开它的href。我想从 iframe 中删除卷轴,我发现了这个'"scorlling=no"'。我找不到在 iframe 中添加这个属性的方法。我试过这个

jQuery(document).ready(function($) {
    $(".modal").click(function() {
      $("#sbox-content iframe").attr("scrolling","no")
    });
});

但它不起作用。这是可能的还是最好的方法是什么?
谢谢。

4

3 回答 3

0

你可以试试这个:

   <a class="modal" rel="{handler: 'iframe', size: {x: 500, y: 400},scrolling:no}" href="http://localhost/site/index.php">Site</a>

不确定,但你可以试一试。

于 2012-09-22T07:42:32.153 回答
0

尝试site/index.php改用http://localhost/site/index.php,iframe 在浏览器中受到保护——尤其是当它们显示来自其他域的页面时。

于 2012-09-22T07:42:40.760 回答
0

overflow: hiddeniframe作品指定。演示:http: //jsfiddle.net/6RGxh/


指定文件overflow: hidden中的<html>元素localhost/site/index.php

于 2012-09-22T07:53:30.937 回答