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