How do I style a span to look like a link without using javascript?

后端 未结 9 1551
慢半拍i
慢半拍i 2021-02-02 06:00

For my website I will need to use instead of , because I am using mostly ajax and thus instead of links I have onclick ajax event

9条回答
  •  误落风尘
    2021-02-02 06:21

    You could use an anchor. But within javascript you'd have to use event.preventDefault() But there is a CSS method thats smaller and easier. Keep your span and use this:

    span:hover{
        cursor:pointer;
    }
    

提交回复
热议问题