DEV Community

Muhibbullah
Muhibbullah

Posted on

How can i create a syntax like vue js in vanilla javascript? [duplicate]

<div id=""&gt <span>{{msg}}</span> </div>

let's think msg is variable of javaScript and now I want to get the parent tag of {{msg}} and push a new value by innerHTML, here {{msg}} working as an identity.

demo javascript example var msg = "This is update data"; {{msg}}.parentElement.innerHTML=msg; this is not ectual…

Top comments (0)