开发者

How to make drop down content with javascript?

I want to add a similar function on my blog like on http:/开发者_Go百科/techcrunch.com/2011/08/04/groupon-acquires-software-devlopment-startup-obtiva/ when you press on author. It is a drop down made with javascript. Anybody can help with a similar javascript as I was trying different implementations for the whole night with no luck.

Thanks in advance!


A basic way to do is just using jquery. Check it from here


I did not find what you are referring to, so I just guess…

First, create the dropdown using document.createElement("select"). Next, create as many "option" elements as you like and add them to the "select" element. Last, add the "select" element into the DOM and you are done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜