Simple JavaScript In Viewer

node v10.24.1
version: 3.0.0
endpointsharetweet
function bar() { document.getElementById("x").innerText = parseInt(document.getElementById("x").innerText, 10) + 1; } function foo() { return `<script>${bar}</script> <h1> <a href="#" onclick="bar()">Click Me!</a> <span id = "x">0</span> </h1>`; } foo();
Loading…

no comments

    sign in to comment