I know it is easy to change text styles, fonts etc., using JS, as for
example below:
<div id="example">Te xt text text</div>
<script...
document.getEle mentById("examp le").style.font Size="110%";
</script>
But what way(s) exist to change the actual text itself? Eg. dynamically
change the string "Text text text" to "Bla bla bla" ? 2 3414
michael <no****@example .com> wrote: I know it is easy to change text styles, fonts etc., using JS, as for example below:
<div id="example">Te xt text text</div>
<script... document.getEle mentById("examp le").style.font Size="110%"; </script>
But what way(s) exist to change the actual text itself? Eg. dynamically change the string "Text text text" to "Bla bla bla" ?
First, this is not a Javascript newsgroup, this is a stylesheets
newsgroup. You'd do better asking this in an appropriate group.
Second, CSS is not used to alter the content. It's role is to style
the content. Your above script would be so much easier and more
reliable to do like this:
<style type="text/css">
#example{font-size:100%;}
</style>
> newsgroup. You'd do better asking this in an appropriate group.
Note taken! have done. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Boris ©avc |
last post by:
What would be the optimum code for replacing string "xxx" with "yyyyyyy" in
a file? (maybe with str_replace function?)
Thanks,
Boris Savc
|
by: JR |
last post by:
Hi. I have a CGI script that will need to call itself an unknown
number of times, to add rows, run queries, etc. At the bottom of the
output that is produced by the script, there are four buttons. I need
one of the buttons to simply be a back button. I have this button
working fine. I need the second and fourth buttons to point to the
current CGI script, but I need the third button to point to a
different CGI script. I need the...
|
by: michael |
last post by:
I have an html text string within a div, eg.:
<div id="example">Text text text</div>
I know its easy to change styles by using getElementById - for example:
document.getElementById("example").style.fontColor="#ff0000";
But what way(s) are there to change the actual text content itself on the
page dynamically, from "Text text text" to"Bla bla bla" ?
|
by: Michael |
last post by:
I have a simple situation, where I have a textbox (myTextBox) which
represents the value of say an integer (myInt). Now, whenever I change the
value of myTextBox, I would like myInt to be updated. I was wondering what
the best approach to do this would be, without having to explicitly write
code such as:
myInt = (int)myTextBox.Text
This may be trivial for one such case, but when I have like 40 text boxes, I
don't want 40 lines of...
|
by: Steve Richter |
last post by:
I am spending too much time thinking of nesting tables within tables to
get the form layout that I want.
a simple example:
Sub heading:
property text: entry field
property text: entry field
Sub heading:
property text: entry field
| |
by: Rob R. Ainscough |
last post by:
I realize I'm learning web development and there is a STEEP learning curve,
but so far I've had to learn:
HTML
XML
JavaScript
ASP.NET using VB.NET
..NET Framework
ADO.NET
SSL
|
by: Ryan Liu |
last post by:
Hi,
I want to change keywords text color in a text editor. I select RichTextBox
and use its Select() method to select keywords line by line, one by one,
then change its color.
this.Select(start,length) ;
this.SelectionColor = color ;
But turns out it is very slow for big file. Is there better way to do so?
|
by: ldpfrog |
last post by:
This is my first tutorial, so if there are any mistakes please forgive me =).
This will show you a very simple way to read your Login information from an outside text file.
What you need:
1. Add a new "Login Dialog" form to your project.
2. Completely erase the code inside of it, but keep the interface.
3. Create a text file listing your usernames and passwords one line after the other.
Your text file should look like this (without...
|
by: Patrick A |
last post by:
All,
I have an Access DB. On a nightly basis, I want to look at an Other
DB (not Access, but SQL) and:
+ Add any new records from Other.Clients into Access.Clients
Is this something I should use a "tool" (SQL Data Compare, SqlSync,
etc.) to do, or could I pull this off reliably every night just using
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |