How to create a HTML Cancel button that redirects to a URL

前端 未结 11 1147
Happy的楠姐
Happy的楠姐 2020-12-13 13:00

I am playing with the Buttons in the w3schools Tryit editor, and I am trying to figure out how to make my browser redirect to an URL when I click on the \"Cancel\" button.

11条回答
  •  温柔的废话
    2020-12-13 13:47

    There is no button type cancel https://www.w3schools.com/jsref/prop_pushbutton_type.asp

    To achieve cancel functionality I used DOM history

    For more details : https://www.w3schools.com/jsref/met_his_back.asp

提交回复
热议问题