简体   繁体   English

如何在不基于URL参数的情况下从YUI TabView中选择选项卡

[英]How can I select a tab from the YUI TabView without clicking it based on URL arguments

I'm using the YUI TabView tab system. 我正在使用YUI TabView选项卡系统。

I want to be able to select a certain tab from this TabView without having to click it. 我希望能够从此TabView中选择某个选项卡而不必单击它。 I want it to automatically open based on arguments I'll pass via URL. 我希望它根据我将通过URL传递的参数自动打开。

I need to know what YUI event to call to make this happen. 我需要知道要调用什么YUI事件才能实现此目的。

Thanks! 谢谢!

You should be able to set the tab using the 'set' method: 您应该可以使用'set'方法设置标签:

myTabs.set("activeTab", tabInstance);

where myTabs is the tabset, and tabInstance is the tab you are going to make active. 其中myTabs是选项卡集,而tabInstance是要激活的选项卡。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM