Frames-CrazyColors

[Total: 0    Average: 0/5]

This files show how to create a page with multiple frames in it.

Head Code:

<!--
<script type=text/javascript>
setColor2.lastvalR=0
setColor2.lastvalB=0
setColor2.lastvalG=0
setColor2.incBy=1
function setColor2(w) {
  setColor2.incBy=Math.round(Math.random()*255)
  setColor2.lastvalR+=setColor2.incBy
  if (setColor2.lastvalR>255) {
    setColor2.lastvalR=0
	setColor2.lastvalB+=setColor2.incBy
    if (setColor2.lastvalB>255) {
	  setColor2.lastvalB=0
	  setColor2.lastvalG+=setColor2.incBy
      if (++setColor2.lastvalG>255) {
	    setColor2.lastvalG=0
	  }
	}
  }
  var colorString="#"+setColor2.lastvalR.toString(16)
                     +setColor2.lastvalB.toString(16)
					 +setColor2.lastvalG.toString(16)
  w.document.bgColor=colorString
  w.setTimeout('parent.setColor2(parent.'+w.name+')',200)
}
function setColor(w) {
  var r = (Math.random() * 256).toString(16);
  var g = (Math.random() * 256).toString(16);
  var b = (Math.random() * 256).toString(16);
  var colorString="#"+r+g+b
  w.document.bgColor=colorString
  w.setTimeout('parent.setColor(parent.'+w.name+')',100)
}
</script>
-->

Body Code:

<!--
<script type=text/javascript>
<frameset rows="25%,25%,25%,25%" cols="25%,25%,25%,25%"
  onLoad="for(var i=0;i<frames.length;i++) setColor2(frames[i]);">
  <frame name="f1" src="javascript:''">
  <frame name="f2" src="javascript:''">
  <frame name="f3" src="javascript:''">
  <frame name="f4" src="javascript:''">
  <frame name="f5" src="javascript:''">
  <frame name="f6" src="javascript:''">
  <frame name="f7" src="javascript:''">
  <frame name="f8" src="javascript:''">
  <frame name="f9" src="javascript:''">
  <frame name="f10" src="javascript:''">
  <frame name="f11" src="javascript:''">
  <frame name="f12" src="javascript:''">
  <frame name="f13" src="javascript:''">
  <frame name="f14" src="javascript:''">
  <frame name="f15" src="javascript:''">
  <frame name="f16" src="javascript:''">
</frameset>
</script>
-->
<a href="http://www.js-examples.com/js/js_frames_ex.html">Click Here To See This Code Work</a>

Times Viewed: 2

Leave a Reply

Your email address will not be published. Required fields are marked *