Is there a way to get a <button> element to link to a location without wrapping it in an <a

后端 未结 8 1997
礼貌的吻别
礼貌的吻别 2020-12-02 06:49

Just wondering if there is a way to get a HTML

8条回答
  •  爱一瞬间的悲伤
    2020-12-02 07:20

    Just do this

    
    

    Although, it's been a while since I've touched JavaScript - maybe location.href is outdated? Anyways, that's how I would do it.

提交回复
热议问题