Thursday, 21 January 2016

Javascript Examples

<!DOCTYPE html>
<html>
<body>
<script>
var x=5;
var y=6;
var z=x+y;
document.write(x + "<br>");
document.write(y + "<br>");
document.write(z + "<br>");
</script>
</body>

</html>
.....................................................................................................

<!DOCTYPE html>
<html>
<body>
<script>
var pi=3.14;
var person="John Doe";
var answer='Yes I am!';
document.write(pi + "<br>");
document.write(person + "<br>");
document.write(answer + "<br>");
</script>
</body>
</html>

0 comments:

Post a Comment