The way to manipulate elements with jquery is different from that with js

The way to manipulate elements with jquery is different from that with js

var UserName = "123"; //Get the login user name

      document.getElementById("labnos").innerText = UserName ;

      var user= $("#labnos").html("123");

 

<span  id="labnos"></span>

 

 document.getElementById("labnos").innerText = UserName ;

 var user= $("#labnos").html("123");

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326445684&siteId=291194637