by using this function document object we can write some text on the web page
<script>
function fun1()
{
document.write('hello");
}
</script>
<input type ="button" value='click" onclick ="fun1()">
<script>
function fun1()
{
document.write('hello");
}
</script>
<input type ="button" value='click" onclick ="fun1()">