What's the best way to open new browser window?

前端 未结 10 1449
一生所求
一生所求 2021-01-30 03:06

I know that most links should be left up to the end-user to decide how to open, but we can\'t deny that there are times you almost \'have to\' force into a new window (for examp

10条回答
  •  既然无缘
    2021-01-30 03:44

    If I'm on a form page and clicking on a moreinfo.html link (for example) causes me to lose data unless I open it in a new tab/window, just tell me.

    You can trick me in to opening a new tab/window with window.open() or target="_blank", but I might have targets and pop-ups disabled. If JS, targets and pop-ups are required for you to trick me into opening a new window/tab, tell me before I get started on the form.

    Or, make links to another page a form request, so that when the visitor submits, the current form data is saved so they can continue from last time, if possible.

提交回复
热议问题