Hello,
I tried to run very simple javascript inside HTML macro in Confluence page.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function myFunction() {
document.getElementById("demo").innerHTML = "Paragraph changed.";
}
</script>
</head>
<body>
<h2>JavaScript in Head</h2>
<p id="demo">A Paragraph.</p>
<button type="button" id="buttonId" onclick="myFunction()">Try it</button>
</body>
</html>
|
The button is showed but when I click it, the function didn't work.
Any help?
Thanks,
Daniel