Difference between HTML and DHTML
HTML |
DHTML |
---|---|
HTML is a Hypertext Markup language. |
DHTML is a Dynamic Hypertext markup language. |
HTML stand for static page. |
DHTML stands for Dynamic. |
HTML does not have a server-side code.. |
DHTML have server-side code. |
Plain page without any scripts and style as called as HTML. |
Page with HTML,CSS and scripts called as DHTML. |
Client-side technologies slow in HTML. |
Client-side technologies fast in HTML. |
Processing from the browser not required in HTML. |
Processing from browser required in DHTML. |
HTML files are stored with .htm or .html extensions. |
DHTML file are stored with .dhtml extension. |
//Program to illustrate HTML vs DHTML
<head>
<title>JavaScript Animation</title>
<script type="text/javascript">
var imgObj = null;
function init(){
imgObj = document.getElementById('myImage');
imgObj.style.position= 'relative';
imgObj.style.left = '0px';
}
function moveRight(){
imgObj.style.left = parseInt(imgObj.style.left) + 10 + 'px';
}
window.onload =init;
</script>
</head>
<body>
<form>
<img id="myImage" src="shiva3.png"height="400" width="600" />
<p>Click button below to move he image to right</p>
<input type="button" value="Click Me" onclick="moveRight();" />
</form>
</body>
</html>
No comments:
Post a Comment