Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of className and a href in javascript

Shulou Source: shulou.com Published: 2022-06-03 12:38:33 11月15日 Update

This article mainly shows you the "sample analysis of className and a href in javascript", which is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and study the "sample analysis of className and a href in javascript".

JS and a href

Pay attention to the end of the semicolon and the closing of quotation marks in href

Empty link pop-up

Generally might as well code, generally let it empty. You can also use the pound sign'# 'when it is empty, but it is not very good.

ClassName#div1 {width:100px; height:100px; border:1px solid black;} .box {background:red;} function toRed () {var oDiv=document.getElementById ('div1'); oDiv.className='box'; / / do not write as class}

Tags: Property function label example analysis event content object quotation mark method time style article index code action name effect way face Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Docker NVidia Shulou Information Shulou Tech Info