gpt4 book ai didi

data-binding - 如何对 iframe src 属性进行数据绑定(bind)?

转载 作者:行者123 更新时间:2023-12-04 02:59:33 24 4
gpt4 key购买 nike

有没有办法数据绑定(bind)src iframe 的属性在我的模型 View 中 knockout 一个项目?这...

<iframe data-bind="src: BioLink" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe>

......没有做到这一点。

最佳答案

使用 attr binding , 像这样:

<iframe data-bind="attr: {src: BioLink}" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe>

关于data-binding - 如何对 iframe src 属性进行数据绑定(bind)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8155208/

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