Stop page execution like the alert() function

后端 未结 7 1718
花落未央
花落未央 2020-11-28 10:37

When I write alert(\'Hello\'), the page execution stops and waits for approval to continue.

I have a div setup to display as a fake alert, usi

7条回答
  •  迷失自我
    2020-11-28 10:54

    I think this is possible using basic JavaScript. You could have the fake button set like this:

    
    

    Then:

    function fakeButtonValChange() {
    var fakebuttonval = document.getElementById("fakeButton").value;
    document.getElementById("fakebutton").value = 
    "clicked"
    if (fakebuttonval == "clicked") {
    *place stuff to show div here (i'm not good with css and that stuff)*
    }
    

提交回复
热议问题