[英]Show a selectList by javascript/JQuery event
I'm trying to raise an event to open a selectList when the page loads. 我正在尝试引发一个事件,以便在页面加载时打开selectList。 It's possible?
这是可能的?
Thank you 谢谢
edit. 编辑。
ok, i will try to explain a little bit more i have a selectList like this: 好的,我将尝试解释更多一点,我有一个selectList像这样:
<select id="myID" name="myName">
<option value=""></option>
<option value="CL">Option1</option>
<option value="CM">Option2</option>
<option value="CP">Option3</option>
</select>
When i click on it, the selectList shows and i can click the option i want, but i want to raise that 'click' event in the page load so the user dont need to click in the "button" to show the list. 当我单击它时,将显示selectList,并且我可以单击我想要的选项,但是我想在页面加载中引发该“单击”事件,因此用户无需单击“按钮”即可显示该列表。 i tried some functions of JQuery like .trigger() but no one works.
我尝试了诸如.trigger()之类的JQuery的某些功能,但没有人起作用。 –
–
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.