|
-
Javascript variables in html tags
Consider the following...
<SCRIPT LANGUAGE="Javascript">
var sFontFace = "arial narrow";
var sFontSize = "8";
</SCRIPT>
<FONT FACE=&{sFontFace}; SIZE=&{sFontSize};>
Hello World!
</FONT>
The above prints Hello World! in some other font other than "arial narrow".
Ideas anyone? This "technique" was referenced on the Netscape site, but
doesn't appear to work on MSIE. Is anyone *really* surprised about this? The
goal here is to make a single assignment to variables that will contain the
font faces and point size, then reference those variables w/in the html,
making maintenance easier.
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks