Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #31414
| From | Martin Honnen <martin.honnen@gmx.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Text changing on click |
| Date | 2016-09-20 11:05 +0200 |
| Organization | Liberty Development |
| Message-ID | <nrqu5j$ck0$1@news.albasani.net> (permalink) |
| References | <eca3f825-b75f-4440-bacc-8dbbeccc5ef2@googlegroups.com> |
On 20.09.2016 07:52, bit-naughty@hotmail.com wrote: > If I have some text, say "Click me", when someone clicks it, I want it to change to "Clicked" - but I owould like say, a greaan curved rectangle around the "Clicked" - how do I do this? > If I assume that the "Clicked" has to be a graphic (which I hope, it does NOT!), then does it have to be downloaded with AJAX? You will need some wrapper element around the text, for instance a "span" element: <span onclick="this.textContent = 'Clicked'; this.style.border = '2px solid green'; this.style.borderRadius = '2em';">Click me</span> Read up on CSS properties like border-radius https://developer.mozilla.org/en/docs/Web/CSS/border-radius.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Text changing on click bit-naughty@hotmail.com - 2016-09-19 22:52 -0700
Re: Text changing on click bit-naughty@hotmail.com - 2016-09-19 22:55 -0700
Re: Text changing on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-20 12:07 +0200
Re: Text changing on click bit-naughty@hotmail.com - 2016-09-21 23:40 -0700
Re: Text changing on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-22 08:42 +0200
Re: Text changing on click bit-naughty@hotmail.com - 2016-09-22 07:23 -0700
Re: Text changing on click Scott Sauyet <scott@sauyet.com> - 2016-09-25 22:21 +0000
Re: Text changing on click "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-09-26 16:25 +0200
Re: Text changing on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-26 17:47 +0200
Re: Text changing on click bit-naughty@hotmail.com - 2016-09-28 22:51 -0700
Re: Text changing on click Scott Sauyet <scott@sauyet.com> - 2016-09-30 03:17 +0000
Re: Text changing on click Martin Honnen <martin.honnen@gmx.de> - 2016-09-20 11:05 +0200
Re: Text changing on click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-20 14:39 +0200
Re: Text changing on click bit-naughty@hotmail.com - 2016-09-21 23:39 -0700
Re: Text changing on click bit-naughty@hotmail.com - 2016-09-22 07:20 -0700
Re: Text changing on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-22 23:44 +0200
Re: Text changing on click bit-naughty@hotmail.com - 2016-09-28 22:54 -0700
csiph-web