0
   

How to show part of the output in italic using ('div') and CSS (JavaScript)

 
 
Reply Sat 20 Jun, 2015 05:06 am
When I use this codes, it Prints the result in a new html page, how can I print the results in a nominated textarea? lets say I want the result to be shown in: bookForm.myText.value

Update: PLEASE NOTE ONLY THE bTitle IS SUPPOSED TO BE ITALIC

HTML:
<div contenteditable="true"></div>

CSS:
span{
font-style: italic;
}

JavaScript:
bTitle = bookForm.txtTitle.value;
bName = bookForm.txtName.value;
bNumber = bookForm.txtNumber.value;

var concatBook = "<span>"+bTitle+"</span> by "+bName+" sold "+bNumber+" Copies."
$('div').html(concatBook);

Please Note that ONLY bTitle is supposed to be italic
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,353 • Replies: 0
No top replies

 
 

Related Topics

Clone of Micosoft Office - Question by Advocate
Do You Turn Off Your Computer at Night? - Discussion by Phoenix32890
The "Death" of the Computer Mouse - Discussion by Phoenix32890
Windows 10... - Discussion by Region Philbis
Surface Pro 3: What do you think? - Question by neologist
Windows 8 tips thread - Discussion by Wilso
GOOGLE CHROME - Question by Setanta
.Net and Firefox... - Discussion by gungasnake
Hacking a computer and remote access - Discussion by trying2learn
 
  1. Forums
  2. » How to show part of the output in italic using ('div') and CSS (JavaScript)
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 12/26/2024 at 01:43:21