Can you make a javascript function replace itself on the page with custom html?

后端 未结 4 1372
无人及你
无人及你 2021-01-13 18:42

I have some javascript which will create some sort of widget on a page. I will be giving this snippet to clients so I want them to have to do very little.

The most o

4条回答
  •  温柔的废话
    2021-01-13 19:18

    I would think it would be possible to do it as follows:

    The end result should be (if I understand your description correctly) that MakeWidgets will replace the contents of the DIV, which, in this case, is the script itself.

提交回复
热议问题