|
-
Mar 15th, 2003, 09:05 PM
#1
Thread Starter
Lively Member
Font color inside document.write()??
I'm kinda new at editing javascript tags and I'm trying to change the font color inside the tag
Code:
document.write( <font color='#000000'>width +"×"+ height )
I have treid numerous combinations but I'm still coming up with an error. Could u please inform me of the correct way to write this. Here is the complete code. This is just a simple screen resolution code.
Code:
<SCRIPT LANGUAGE="Javascript"><!--
if (self.screen) { // for NN4 and IE4
width = screen.width
height = screen.height
// Testing this first prevents firing the slow Java of NN4
}
else if (self.java) { // for NN3 with enabled Java
var jkit = java.awt.Toolkit.getDefaultToolkit();
var scrsize = jkit.getScreenSize();
width = scrsize.width;
height = scrsize.height;
}
else{
width = height = '?' // N2, E3, N3 w/Java off, probably Opera and WebTV
}
document.write(" Screen Resolution:");
document.write( <font color='#000000'>width +"×"+ height )
//or whatever based on the above results
//--></SCRIPT>
Thanks in Advance
 [vbcode]Private Sub Form_Load()
I would rather be hated for who I am than loved for who I'm not.[/vbcode]
End Sub
-
Mar 15th, 2003, 09:21 PM
#2
Try asking in the appropriate forum
You'll probably get a better response there.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 18th, 2003, 07:22 PM
#3
Thread Starter
Lively Member
Ahh I see now, sorry about that .
Last edited by CagedConfession; Mar 18th, 2003 at 07:32 PM.
 [vbcode]Private Sub Form_Load()
I would rather be hated for who I am than loved for who I'm not.[/vbcode]
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|