Wrox Programmer Forums
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 4th, 2004, 04:54 PM
Registered User
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default display strings

hi i'm wondering if someone would help me answer these two questions?
as i am not too familiar with the JavaScripts language
i would be very grateful :D

1. Create a short script in JavaScript that writes
two lines of text. The first line of text should be in Green and
the second line of text in Blue.

2. Write one line of JavaScript that prompts the user to input his
name and assigns this value to a variable called user_name. For the
 prompt text, use "Enter your name below.".

Old November 4th, 2004, 08:21 PM
Friend of Wrox
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts


document.write("<span style='color:green'>first line</span><br/>");
document.write("<span style='color:blue'>second line</span>");


var user_name = prompt("Enter your name below:","");


Where will you be in 100 years?
Try new FreshView 0.2!
Old November 5th, 2004, 09:00 AM
Registered User
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

thanks very much ;)

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display Filter Strings in Report Header Jabba007 Access VBA 7 July 17th, 2007 12:07 PM
strings bschleusner C# 2005 3 February 27th, 2007 11:46 PM
Read and Display Strings nav PHP How-To 1 March 27th, 2005 09:44 AM
strings... slowhand BOOK: ASP.NET Website Programming Problem-Design-Solution 1 January 5th, 2004 06:27 AM
strings slowhand SQL Server 2000 1 January 5th, 2004 12:20 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.