How to set focus on the last element for which the window pop ups on error

前端 未结 1 1536
迷失自我
迷失自我 2020-12-22 08:40

On checking a field against validations, if validation fails , a pop up window is opened.Now when i close the pop up the pop up should return the focus to the last element(i

1条回答
  •  礼貌的吻别
    2020-12-22 09:06

    In your code, use:

    MyPopUpWin(message); <- existing line
    inputs[i].focus()
    

    0 讨论(0)
提交回复
热议问题