jQuery “Object doesn't support this property or method” in Internet Explorer

前端 未结 3 702
自闭症患者
自闭症患者 2021-01-11 15:38

I am using jQuery to add some dynamic content to a website.

I am attempting to create a new DOM element on-demand using the following code:

container         


        
3条回答
  •  感情败类
    2021-01-11 16:12

    If you want to add a DOM element, the code needs to be modified a bit:

    $('body').append('
    '); // body can be whatever containing element you want to hold myContainer $('#myContainer').html('whatever you want inside of myContainer');

提交回复
热议问题