Changing Data Values using CSS

S

sgconger

I have a list of data values that are in an html <span id=x>1. My List
One</span>. I want to be able in CSS (not change the html) to remove
the 1. so that when it is displayed all I get is My List One. It
seems like there should be a way to do this using CSS. Any help would
be greatly appreciated.

If this can be done somehow with embedded Java script in the CSS and
no changes to the html then I would be interested in that solution
also. It has to work with IE 6 and IE7.

Thanks,
Susan Conger
 
E

Evertjan.

wrote on 18 jul 2007 in comp.lang.javascript:
I have a list of data values that are in an html <span id=x>1. My List
One</span>. I want to be able in CSS (not change the html) to remove
the 1. so that when it is displayed all I get is My List One. It
seems like there should be a way to do this using CSS. Any help would
be greatly appreciated.

If this can be done somehow with embedded Java script in the CSS and
no changes to the html then I would be interested in that solution
also. It has to work with IE 6 and IE7.


=================================
<span id=x>1. My List One</span>

<script type='text/javascript'>
var x = document.getElementById('x');
x.innerHTML = x.innerHTML.slice(3);
</script>
=================================

preferably do this with regex .replace(),
when you know exactly what strings to expect
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top