gpt4 book ai didi

Jquery 将 .attr 设置为 iframe 滚动 = yes

转载 作者:行者123 更新时间:2023-12-03 23:01:28 25 4
gpt4 key购买 nike

我有一个带有“scrolling=”no””的 iframe 和一个在需要时将 iframe 属性设置为“scrolling=”yes”的按钮。

    $("#button3").click(function(){
$( "#iframe_id" ).attr( "scrolling", "yes" );});

但是,当我按下按钮3时,只有在刷新 iframe 后,滚动条才出现。如何强制srcoll栏立即出现?

现在如何运作: http://jsfiddle.net/77van/k8GhZ/1/

最佳答案

现在 jquery 将 .attr 设置为 scrolling="yes" 并重新加载 iframe!

$(document).ready(function () {
$("#button3").click(function () {
$("#iframe_id").attr("scrolling", "yes");
$('#iframe_id').attr("src", $('#iframe_id').attr("src"));
});
});

http://jsfiddle.net/77van/k8GhZ/10/

关于Jquery 将 .attr 设置为 iframe 滚动 = yes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18557071/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com