Hello, i want to make a color in the text of innerHTML with this script - <script language = "javascript">
-
var color = "FFF000";
-
document.getElementById('showEmailValidation').innerHTML = "<font color=#"+color+">"test"</font>";
-
-
</script>
but it didn''t succeed, any idea??
5 9502
For your information, the fault is not in "inn erHTML", i only wrong in putting the script into this editor,...
so, any idea???
For your information, the fault is not in "inn erHTML", i only wrong in putting the script into this editor,...
so, any idea???
ok/...sorry, i';ve already solved the problem...
So to solve that problem, the script become like this one below : - <script language="javascript">
-
-
var color = "#FF0000";
-
document.getElementById('showEmailValidation').innerHTML = "<font color="+color+">test</font>";
-
-
</script>
-
thanks for all,,,
best regards, mamin
ok/...sorry, i';ve already solved the problem...
So to solve that problem, the script become like this one below :
<script language="javascript">
var color = "#FF0000";
document.getElementById('showEmailValidation').inn erHTML = "<font color="+color+">test</font>";
</script>
thanks for all,,,
best regards, mamin
and again,,,the "innerHTML" (no empty space) is always printed become "inn erHTML"(there is an empty space) in the display,
just ignore that...tks
gits 5,390
Expert Mod 4TB
glad to hear that you found the mistake for yourself and for posting the solution. all attribute values should be in quotes always and one more note: just leave the language attribute of the script-tag ... it's deprecated ... just use the type attribute instead like this: - <script type="text/javascript">
kind regards
glad to hear that you found the mistake for yourself and for posting the solution. all attribute values should be in quotes always and one more note: just leave the language attribute of the script-tag ... it's deprecated ... just use the type attribute instead like this: - <script type="text/javascript">
kind regards
ok thanks...
kind regards :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Richard A. DeVenezia |
last post by:
I hope this is the end of my present 'discovery' phase. I've learned alot
about JavaScript in a short time and my head hurts. The following is what
came out of all my questions and all the...
|
by: Chris |
last post by:
How can I get the innerHTML of a <div> area only when the page loads, then use that variable in a function?
Here is my code:
function setContent(zz)
{
var lb =...
|
by: ajay |
last post by:
I have following code for a slide menu but i twiked it to work for a
single level menu. Open it in a Browser to get a clear picture.
I have 2 Qs
1) How to make first entry as non-link. i.e i...
|
by: |
last post by:
Just about finished with an include modual that allows a user to select
a color. Completely dynamic. all you have to do is include the script and
run the main trigger script.
One problem with...
|
by: PJ |
last post by:
Greetings...
I have stumbled upon a small problem.
I use Ajax to retrieve part of a page I need to update. I update a DIV
element with the HTML contents I get from another page.
It works...
|
by: martymix |
last post by:
simple question:
I have a simple <dt>test text</dt>
I get the innerHTML of that dt, and I try and append some text to it
like so:
dt = document.getElementsByTagName('dt')
var text =...
|
by: artev |
last post by:
for make on-fly some box te3xt and select,
(select that will be use for to choose datas)
is better to use Dom or innerhtml?
|
by: PaPa |
last post by:
I'm not sure this is a javascript issue or an HTML issue. I notice
that when I extract the contents of a div using the innerHTML property
(?), that I wind up with a literal variable (?) which...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |