<html>
<body>
<p id="demo">Click the button to display the natural logarithm of a number.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML=Math.log(2);
}
</script>
</body>
</html>