![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Rather than opening a new window, how can I add a text (or HTML code) in the same HTML page, in a specific location? The code I tried is the following: head script language="JavaScript" function displayText() { document.write("qwertyuiop"); } /script /head body a href="javascript:displayText()">Text</a /body |
#3
| |||
| |||
|
|
Rather than opening a new window, how can I add a text (or HTML code) in the same HTML page, in a specific location? The code I tried is the following: head script language="JavaScript" function displayText() { document.write("qwertyuiop"); } /script /head body a href="javascript:displayText()">Text</a /body |
#4
| |||
| |||
|
|
Rather than opening a new window, how can I add a text (or HTML code) in the same HTML page, in a specific location? The code I tried is the following: head script language="JavaScript" function displayText() { document.write("qwertyuiop"); } /script /head body a href="javascript:displayText()">Text</a /body |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Thank you Laurent and Guy for your quick replies; However, for didactive purposes, I would like to understand the details: - What is wrong with the javascript: pseudo protocol in a link? - what is 'return false;' used for excactly? return false; interrompt la séquence d'exécution. |
|
- What do you mean exactly by 'use the DOM Level 2 to access the text node you want to modify?' |
|
Thank you Caroline |
#7
| ||||
| ||||
|
|
Thank you Laurent and Guy for your quick replies; However, for didactive purposes, I would like to understand the details: - What is wrong with the javascript: pseudo protocol in a link? |
|
- what is 'return false;' used for excactly? |
|
- What do you mean exactly by 'use the DOM Level 2 to access the text node you want to modify?' |
|
Thank you Caroline |
![]() |
| Thread Tools | |
| Display Modes | |
| |