gpt4 book ai didi

javascript - 带复选框的 mootools 模态框

转载 作者:行者123 更新时间:2023-11-28 10:31:42 24 4
gpt4 key购买 nike

我已经在我的网站中实现了一个模态框,可以在 <a> 上运行。就像下面这样,

<a href="http://www.example.com" rel="moodalbox">External Site</a>

单击此链接将在模式窗口中启动 example.com。我想重新创建这种效果,但是我不想使用链接,而是想使用复选框,这可能吗?我知道复选框不支持 relhref ,那么使用 mootools 有没有办法在复选框上放置监听器并将模式框启动到指定的 url?

任何帮助或建议将不胜感激。

最佳答案

快速解决方法可以是单击隐藏链接。单击复选框时。

下面的方法也可以帮助您覆盖模态框行为


window.addEvent('domready', {

/**
* Set default options, overrideable from later calls.
*/
SqueezeBox.initialize({
size: {x: 350, y: 400}
});

/**
* Assign SqueezeBox to all links with rel="boxed" attribute, the class then reads the "href".
*/
SqueezeBox.assign($$('a[rel=boxed]'));

/**
* Open some content manually
*/
SqueezeBox.open('manual.html'); // handler defaults to "ajax" for urls

SqueezeBox.open('http://digitarald.de', {handler: 'iframe'}); // we force the "iframe" handler here ...

SqueezeBox.open($('welcome'), {handler: 'adopt'}); // and here we force "adopt" handler
});

关于javascript - 带复选框的 mootools 模态框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2881444/

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