by Sikvaruli on Sun Nov 09, 2008 6:04 pm
([msg=14730]see Re: Difference between Javascript and HTML[/msg])
lol, there's a huge difference.
Html is the basic outline of a site.
<html>
<meta>ilikestripes</meta>
<title>ilikestripes</title>
<body bgcolor= "ilikestripes">
I like stripes
</body>
</html>
There's a simple website right there. Short, easy, and to the point.
Javascript deals with popups and whatnot, different site functions, etc.
<div style="position:relative;left:0px;top:0px">
<span id="highlighter" style="position:absolute;left:0;top:0;font-size:18px;font-family:Verdana;background-color:yellow;clip:rect(0px 0px auto 0px)"></span>
</div>
<script type="text/javascript">
tickercontents[1]='Hop on over to <a href="http://www.ilikestripes.com">ilikestripes</a> ilikstripes!'
var tickdelay=3000 //delay btw messages
var highlightspeed=10 //10 pixels at a time.
////Do not edit pass this line////////////////
var currentmessage=0
var clipwidth=0
function changetickercontent(){
crosstick.style.clip="rect(0px 0px auto 0px)"
crosstick.innerHTML=tickercontents[currentmessage]
highlightmsg()
}
function highlightmsg(){
var msgwidth=crosstick.offsetWidth
if (clipwidth<msgwidth){
clipwidth+=highlightspeed
crosstick.style.clip="rect(0px "+clipwidth+"px auto 0px)"
beginclip=setTimeout("highlightmsg()",20)
}
else{
clipwidth=0
clearTimeout(beginclip)
if (currentmessage==tickercontents.length-1) currentmessage=0
else currentmessage++
setTimeout("changetickercontent()",tickdelay)
}
}
function start_ticking(){
crosstick=document.getElementById? document.getElementById("highlighter") : document.all.highlighter
crosstickParent=crosstick.parentNode? crosstick.parentNode : crosstick.parentElement
if (parseInt(crosstick.offsetHeight)>0)
crosstickParent.style.height=crosstick.offsetHeight+'px'
else
setTimeout("crosstickParent.style.height=crosstick.offsetHeight+'px'",100) //delay for Mozilla's sake
changetickercontent()
}
if (document.all || document.getElementById)
window.onload=start_ticking
</script>
This is javascript for a different scroller on the side of a page. You put in java script IN html.
<html>
<meta>ilikestripes</meta>
<title>ilikesstripes</title>
<body bgcolor= "ilikestripes">
<script= "javascript>
}
fuction ilikestripes{
</script>
</body>
</html>
Html is the layout of a site. Javascript is fuctions in the site that make it look better. Html is necessary for sites; but Javascript is not.
I want to learn how to hack/bypass: .bat file restrictions, bypass administration restriction, and how to hack websites.
"Sikvaruli" is Georgian for "Love"
Sikvaruli; სიყვარული :D