We can change picture in the client side, which mean, when we move the mouse to it, it will change other picture. I am trying to find a way to change the text. Like this. I put "Point me!!!!" in page. When the mouse point to it,It will change to "Yes, You Point Me!!!, Now click Me!!!". Like this. Thank you.
Comments
[code]
function changeText(text, obj){
obj.replaceChild(document.createTextNode(text), obj.childNodes[0]);
}
[/code]
Then add the element you want to work on, for example P element:
[code]
Point me!
[/code][b][italic]Philip Patrick[/italic][/b]
[b]Home page[/b]: http://www.saintopatrick.com
[size=1][italic]"Two beer or not two beer?"[/italic] [b]Shakesbeer[/b][/size]
1) Can it replace with VBScript as I don't know much about JavaScript.
2) Where to download a JavaScript E-Book(0-5MB, I see some ebook up to 100MB ;-0).
Thank You.
: Create a script and function in it:
: [code]
: function changeText(text, obj){
: obj.replaceChild(document.createTextNode(text), obj.childNodes[0]);
: }
: [/code]
:
: Then add the element you want to work on, for example P element:
: [code]
:
Point me!
: [/code]:
: [b][italic]Philip Patrick[/italic][/b]
: [b]Home page[/b]: http://www.saintopatrick.com
: [size=1][italic]"Two beer or not two beer?"[/italic] [b]Shakesbeer[/b][/size]
:
:
I dunno where you can find a book, but you can look at http://www.w3schools.com for reference and quick tutorials
: I think I can see the code, but I have 2 question to ask.
: 1) Can it replace with VBScript as I don't know much about JavaScript.
: 2) Where to download a JavaScript E-Book(0-5MB, I see some ebook up to 100MB ;-0).
: Thank You.
[b][italic]Philip Patrick[/italic][/b]
[b]Home page[/b]: http://www.saintopatrick.com
[size=1][italic]"Two beer or not two beer?"[/italic] [b]Shakesbeer[/b][/size]