Ex1: DHTML JavaScript (HTML + JavaScript
Event)
<html>
<head>
<title>
Method of a JavaScript </title>
<script
type="text/javascript">
function msg(){
document.write("Welcome");
}
</script>
</head>
<body>
<form name="f1">
<input type="button" value="click"
onclick="msg()">
</form>
</body>
</html>
**********************************************************
Ex2: DHTML JavaScript (HTML DOM+ JavaScript
Event)
<html>
<head>
<title>
Method of a JavaScript </title>
<script
type="text/javascript">
function msg(){
var
x1=document.getElementById("t1").value;
alert(x1);
}
</script>
</head>
<body>
<form name="f1">
Enter value : <input type="text" id="t1">
<input type="button" value="click"
onclick="msg()">
</form>
</body>
</html>
**************************************************************
Ex3: DHTML CSS (HTML + CSS) – Internal style
sheet
<html>
<head>
<title>CSS</title>
<style>
body {
background-color:blue;
color: yellow;
}
</style>
</head>
<body>
welcome to CSS
</body>
</html>
****************************************************************
Ex4: DHTML CSS (HTML + CSS) – Internal style
sheet
<html>
<head>
<title>CSS</title>
<style>
body
{
background-color: blue;
color: yellow;
}
p{
font-family: verdana;
font-size: 20px;
}
</style>
</head>
<body>
welcome to CSS
<p>This is a paragraph</p>111
</body>
</html>
********************************************************************
Ex5: DHTML CSS (HTML + CSS) – Internal &
Inline style sheet
<html>
<head>
<title>CSS</title>
<style>
body{
background-color:yellow;
color:blue;
font-size:28px;
}
</style>
</head>
<body>
<marquee onmouseover="this.stop()"
onmouseout="this.start()">
welcome to CSS
</marquee>
</body>
</html>
**************************************************************