Computing.Net > Forums > Programming > Yet another Javascript Question

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Yet another Javascript Question

Reply to Message Icon

Original Message
Name: go_places_puterwize
Date: December 29, 2006 at 10:01:03 Pacific
Subject: Yet another Javascript Question
OS: Windows Server 2003 Stand
CPU/Ram: P4/256MB
Model/Manufacturer: Gateway/300s
Comment:

Hi Pplz, Quick and simple question:
I made a little script that shows you the color of the page when you click the button.
Heres what I have:
<INPUT TYPE="BUTTON" name="colr" value="Show Color" onClick="alert(document.bgColor)">

I know this script works.
I just want to know how to put text in front of it like this:

<INPUT TYPE="BUTTON" name="colr" value="Show Color" onClick="alert('Background Color is:'document.bgColor)">
How would I go about doing that?


Curiousity only injured the cat.
I finished it off..
Muahahaha...


Report Offensive Message For Removal


Response Number 1
Name: Michael J (by mjdamato)
Date: December 29, 2006 at 10:07:00 Pacific
Reply: (edit)

For the third time these questions belon in the web development section.

<INPUT TYPE="BUTTON" name="colr" value="Show Color" onClick="alert('Background Color is:'+document.bgColor)">

Michael J


Report Offensive Follow Up For Removal

Response Number 2
Name: go_places_puterwize
Date: December 29, 2006 at 17:42:46 Pacific
Reply: (edit)

thanks, im just that stupid

Curiousity only injured the cat.
I finished it off..
Muahahaha...


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge
Poll History




Data Recovery Software