How to display an Alert in Bootstrap Modal

前端 未结 2 1606
囚心锁ツ
囚心锁ツ 2020-12-29 10:36

$(window).load(         


        
2条回答
  •  春和景丽
    2020-12-29 10:53

    Probably I didn't understood your question correctly, but you can't use the alert function to display a message insidea a page element. Alert displays a system alert outside the page dom.

    If you want to display a message inside a modal you have to include (or inject) the modal markup in your page html, then you simply show/hide the modal via bootstrap functions.

    You have a very good example here

提交回复
热议问题