一键点击下拉菜单即可更改iframe [英] Change iframe as one click on Dropdown menu

查看:124
本文介绍了一键点击下拉菜单即可更改iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个下拉菜单,我想在下拉菜单的链接上单击一下,它应该在 iframe 里面打开,它也位于同一页面中,以便菜单保持不变.

如图所示或进入以下链接.只需单击登录按钮,然后单击下拉菜单,您将只看到页面的中间部分被更改,而不是页眉或页脚.
http://demo26.orangehrm.com/index.php [

Hi,

I''ve dropdown menu and i want as one click on the link of dropdown menu it should be opened inside iframe which is also placed in the same page so that the menu will be stick.

As shown or done into following link. Just click on Login Button then click on dropdonw menu and you''ll see only middle part of the page is changed not header or footer.
http://demo26.orangehrm.com/index.php[^]

推荐答案



在DropDownMenu单击事件中使用iframe1.Attributes("src")="url".
Hi,

Use iframe1.Attributes("src") = "url" in your DropDownMenu Click Event.


在单击菜单时调用此函数.发送所需的页面以显示为参数.
Call this function on menu click. Send required page to display as a parameter.
function SetFrame(obj urlPage)
{
document.getElementById(''YourIframeID'').src = urlPage;
}


这篇关于一键点击下拉菜单即可更改iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆