I need the below code to make all the text appear on the screen bold. I have only figured out how to change part of it. Could someone help with making all the text bold?
<html>
<body>
<script language='JavaScript'> //set the language
a=(prompt('please enter the CD Title:',0)); // enter the cd title promt
b=parseFloat(prompt('please enter the CD Cost:',0)); // enter the cd cost promt
document.write(' your CD Title is: ' ,a.bold()); //write the cd title to the screen in bold
document.write(' your CD Cost is: ' ,b); //write the cd cost to the screen
I need the below code to make all the text appear on the screen bold. I have only figured out how to change part of it. Could someone help with making all the text bold?
<html>
<body>
<script language='JavaScript'> //set the language
a=(prompt('please enter the CD Title:',0)); // enter the cd title promt
b=parseFloat(prompt('please enter the CD Cost:',0)); // enter the cd cost promt
document.write(' your CD Title is: ' ,a.bold()); //write the cd title to the screen in bold
document.write(' your CD Cost is: ' ,b); //write the cd cost to the screen
Have you tried the code in all browsers? No idea why your code isn't working for you. However, the following code produces the same result:
Code:
a=(prompt('please enter the CD Title:',0)); // enter the cd title promt
b=parseFloat(prompt('please enter the CD Cost:',0)); // enter the cd cost promt
document.writeln(' your CD Title is: <b>' + a + '</b>'); //write the cd title to the screen in bold
document.writeln(' your CD Cost is: ' + b); //write the cd cost to the screen
Have you tried the code in all browsers? No idea why your code isn't working for you. However, the following code produces the same result:
Code:
a=(prompt('please enter the CD Title:',0)); // enter the cd title promt
b=parseFloat(prompt('please enter the CD Cost:',0)); // enter the cd cost promt
document.writeln(' your CD Title is: <b>' + a + '</b>'); //write the cd title to the screen in bold
document.writeln(' your CD Cost is: ' + b); //write the cd cost to the screen
Hello
I don't think i made it clear. I need all the text to appear bold not just the CD title.
It needs to look like this
your CD Title is: eastenders your CD Cost is: 544
Currently it looks like this
your CD Title is: eastenders your CD Cost is: 544
Any ideas? Every time i try to add the code in it stops working
<html><body><script language='JavaScript'> //set the language
a=(prompt('please enter the CD Title:',0)); // enter the cd title promt
b=parseFloat(prompt('please enter the CD Cost:',0)); // enter the cd cost promt
document.write('<b>'); // beginning bold tag
document.write(' your CD Title is: ' ,a); //write the cd title to the screen
document.write(' your CD Cost is: ' ,b); //write the cd cost to the screen
document.write('</b>'); // closing bold tag
</script></body></html>
"It will never rain roses: when we want to have more roses, we must plant more roses."
- George Eliot
<html>
<body>
<script type='text/JavaScript'> //set the language
a=(prompt('please enter the CD Title:',0)); // enter the cd title promt
b=parseFloat(prompt('please enter the CD Cost:',0)); // enter the cd cost promt
document.write(' your CD Title is: ' + a.bold() ); //write the cd title to the screen in bold
document.write( (' your CD Cost is: ' + b ).bold() ); //write the cd cost to the screen
</script>
</body>
</html>
Where used, return should be executed unconditionally and always as the last statement in the function.
That's my signature, it's not part of the damn post!
<html><body><script language='JavaScript'> //set the language
a=(prompt('please enter the CD Title:',0)); // enter the cd title promt
b=parseFloat(prompt('please enter the CD Cost:',0)); // enter the cd cost promt
document.write('<b>'); // beginning bold tag
document.write(' your CD Title is: ' ,a); //write the cd title to the screen
document.write(' your CD Cost is: ' ,b); //write the cd cost to the screen
document.write('</b>'); // closing bold tag
</script></body></html>
Thanks very helpful. What would be the situation if i need the font to have more than one format like italics or underlined
Bookmarks