Is there a JavaScript alert that doesn't pause the script?

后端 未结 6 1112
甜味超标
甜味超标 2020-11-28 07:51

I\'m looking for something like alert(), but that doesn\'t \"pause\" the script.

I want to display an alert and allow the next command, a form sub

6条回答
  •  温柔的废话
    2020-11-28 08:19

    It may not be what you're looking for, but it might be appropriate to use window.status = 'foo'.

    I use this a lot in one of my webapps for a intranet. Also the setTimeout approach works too, but it can block if the browser is busy on an intensive task. However the status bar update is always immediate.

    This does require your viewers to have the setting that javascript can change the status bar -- always the case if it's a trusted site.

提交回复
热议问题