|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
Aggiungere un textarea dopo lo span
Sono un ignorante con le DOM di JS e sopratutto perchè i createElement è una cosa nuova per me....
allora ho questa situazione Codice:
<div id="post12" class="post-it" onclick="post_it_press('post12');" onDblClick="post_it_edit('post12');" >
<span id="post12_text">Io sono mago2<br>ahauhauhau
</span>
</div>
Codice:
function post_it_edit(nome) {
if (post_it_edit == 0) {
post_it_edit = 1;
nome_post_it_edit = nome;
var html_post = document.getElementById(nome_post_it_edit);
var node = document.body.parentNode;
if (document.createTextNode){
var textarea = document.createElement('TEXTAREA');
textarea.setAttribute("name","textarea");
node.insertBefore(textarea,node);
// html_post.appendChild(textarea);
}
}
}
Ultima modifica di max246 : 04-01-2007 alle 10:46. |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
risolto....
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 00:27.


















