Saturday, 11 January 2014

HTML WITH JAVASCRIPTY

Here is a simple way to display a text in a browser using using Javascript

<!DOCTYPE html>
<head>
<title>Home</title>
</head>
<body bgcolor='gray'>
<script>
document.write("I welcome you to my website, have a nice day");
</script>
</body>
</html>

The above piece of JavaScript code will display a message "I welcome you to my website, have a nice day" when the browser loads the page.

No comments:

Post a Comment