How can I control the "value" or content of a button using CSS (perhaps as a style) or through javascript? -



How can I control the "value" or content of a button using CSS (perhaps as a style) or through javascript? -

is there way 1 can utilize css or javascript command not button style, button says. i've seen many "css button creator" tools out there, require html, or portion of code requires "push here".

(update) give thanks input. allow me explain more of big picture. in short, using 3rd party command ecommerce end of our site. have css override file can utilize command lot of site displays.

here rough illustration of button: http://jsfiddle.net/buford/ylsht/

<style type="text/css"> .btn { background: #3498db; background-image: -webkit-linear-gradient(top, #3498db, #2980b9); background-image: -moz-linear-gradient(top, #3498db, #2980b9); background-image: -ms-linear-gradient(top, #3498db, #2980b9); background-image: -o-linear-gradient(top, #3498db, #2980b9); background-image: linear-gradient(to bottom, #3498db, #2980b9); -webkit-border-radius: 6; -moz-border-radius: 6; border-radius: 6px; font-family: arial; color: #ffffff; font-size: 20px; padding: 10px 20px 10px 20px; text-decoration: none; } .btn:hover { background: #3cb0fd; background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db); background-image: -moz-linear-gradient(top, #3cb0fd, #3498db); background-image: -ms-linear-gradient(top, #3cb0fd, #3498db); background-image: -o-linear-gradient(top, #3cb0fd, #3498db); background-image: linear-gradient(to bottom, #3cb0fd, #3498db); text-decoration: none; } </style>

<body><a href="#" class="btn">push me</a></body>

there way can update html code "push me" can variable controlled means of css or javascript?

sure, if button element blank.

here's html:

<button></button>

and, css:

button:before { content: "click me"; }

and fiddle: http://jsfiddle.net/3azkt/

javascript css button

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -