<p id="rand"></p>
<script>
    document.getElementById('rand').textContent = Math.floor(Math.random() * 100);
</script>
alert() ile göstermek yerine göstermek istediğiniz text'e id verip, yukarıdaki metodu uygulayabilirsiniz hocam