Elegant clean way to include HTML in JavaScript files?

后端 未结 7 2167
误落风尘
误落风尘 2020-12-23 10:05

I\'m building a small app with a few modal dialog windows. The windows require a tiny bit of HTML. I\'ve hard coded the window HTML in the javascript library but am not th

7条回答
  •  情深已故
    2020-12-23 10:51

    You can include the HTML as regular markup at the end of the page, inside an invisible div. Then you're able to reference it with jQuery.

    You then need to programmatically set your variable fields (email, subject, body)

    
    
    
    

提交回复
热议问题