|
Post by JamesK on Aug 9, 2009 11:15:43 GMT
It returns a JS action message saying 'Hello' but the variable is set so it won't go away?
|
|
|
Post by Mark on Aug 9, 2009 13:34:36 GMT
It returns a JS action message saying 'Hello' but the variable is set so it won't go away? Indeed, Your turn.
|
|
|
Post by JamesK on Aug 9, 2009 14:16:47 GMT
hmmmm.. <style type=text/css> .1 { text-color: blak; font: verdama; font-weight: bold }
<div id='1'>text</div>
Fix this so it works and tell me what it does
|
|
|
Post by Matt on Aug 9, 2009 16:45:03 GMT
Its colour writing and it doesnt like spaces
|
|
|
Post by JamesK on Aug 9, 2009 17:52:33 GMT
correct it.
|
|
|
Post by Matt on Aug 9, 2009 20:14:30 GMT
<styletype=text/css>.1 {text-color:blak; font:verdama; font-weight:bold} <div id='1'>text</div> i hope this is it oh sod it
|
|
|
Post by JamesK on Aug 9, 2009 21:13:51 GMT
nope. Far off
|
|
|
Post by Mark on Aug 9, 2009 22:56:32 GMT
<style type=text/css> .1 { color: black; font-family: verdana; font-weight: bold;
}
<div class = '1'>text</div>
Makes text black and it will display as bold
if it's id ... you use #1, .1 is if it's class = '1'
|
|
|
Post by ElseAndrew on Aug 10, 2009 2:16:13 GMT
Not got another Mark? Heres one... <script type="text/javascript">
var bannerImages = [ "http://elseandrew.com/thumbs/lifelarge.gif", "http://elseandrew.com/thumbs/Shadez.png", "http://elseandrew.com/thumbs/flashstrike.png" ]; var randomImage = Math.floor(Math.random ( ) bannerImages.length); document.write("<img src ='"+bannerImages[randomImage] + "'\/>");
</script>
Fixy
|
|
|
Post by JamesK on Aug 10, 2009 8:41:13 GMT
Oh wow. Wouldn't know where to start on that It displays a random image. But it looks fine to me @mark- I was gonna accept class or id
|
|
|
Post by ElseAndrew on Aug 10, 2009 15:27:56 GMT
It displays a random image - easy to guess as I named the varibles Also, its not fine its broked Fixy
|
|
|
Post by JamesK on Aug 10, 2009 15:44:55 GMT
I can't mate. I'm no good at JS...yet. any good sites other than w3schools to use to learn?
|
|
|
Post by Wrighty on Aug 10, 2009 16:20:47 GMT
<style type=text/css> .1 { color: black; font-family: verdana; font-weight: bold; } <div class = '1'>text</div> Makes text black and it will display as bold if it's id ... you use #1, .1 is if it's class = '1' Actually that was missing the </style> tag ... I just realised! --------------------------------- <script type="text/javascript">
var bannerImages = [ "http://elseandrew.com/thumbs/lifelarge.gif", "http://elseandrew.com/thumbs/Shadez.png", "http://elseandrew.com/thumbs/flashstrike.png" ]; var randomImage = Math.floor(Math.random() * bannerImages.length); document.write("<img src ='" + bannerImages[randomImage] + "' />");
</script>
|
|
|
Post by ElseAndrew on Aug 10, 2009 16:44:43 GMT
<style type=text/css> .1 { color: black; font-family: verdana; font-weight: bold; } <div class = '1'>text</div> Makes text black and it will display as bold if it's id ... you use #1, .1 is if it's class = '1' Actually that was missing the </style> tag ... I just realised! --------------------------------- <script type="text/javascript">
var bannerImages = [ "http://elseandrew.com/thumbs/lifelarge.gif", "http://elseandrew.com/thumbs/Shadez.png", "http://elseandrew.com/thumbs/flashstrike.png" ]; var randomImage = Math.floor(Math.random() * bannerImages.length); document.write("<img src ='" + bannerImages[randomImage] + "' />");
</script> Your turn. @ The CSS code.. Theres lots missing
|
|
|
Post by Wrighty on Aug 10, 2009 16:50:06 GMT
<script type = 'text/javascript'> var f = { txt: function(x){ return document.createTextNode(x); }, font: function(x, y){ f = document.creatElement('font'); if(y.length > 0) for(n in y) f.setAttribute(y[n][0], y[n][1]); if(typeof x = 'string') f.innerHTML = x; else f.appendChild(x); return f; } };
document.body.appendChild(f.font(f.txt('Hai'), ["size, "1"], ["className", "text"])); </script>
*shrugs* I think that's it!
|
|