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.
精彩评论