Where is the Documentation for all of the Javascript HTML Element Constructors?

后端 未结 4 1424
無奈伤痛
無奈伤痛 2020-12-19 16:58

I cannot seem to find it. Thanks!

Example:

$(\"#MySelect\").append(new Option(\"MyOption\", \"MyOption\", true, true));
4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-19 17:39

    The syntax you have looks like it might be jQuery - is it? If so, then append takes an HTML string. You don't have to create HTMLElement subclasses for it.

    This reference from Mozilla will be helpful in understanding the HTML DOM elements.

    This site provides javadoc style documentation on the HTMLElement class and its subclasses.

提交回复
热议问题