Axel Richter: Einen Link definieren

Beitrag lesen

Hallo,

Ich wollte einen Link kreieren:

current_link = document.createElement("a");
    current_link.text = line.childNodes[i].text;

^Woher hast Du die Information, dass es [link:http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-48250443@title=HTMLAnchorElement].text gibt?

current_link.href = line.childNodes[i].getAttribute("link"));
    mycurrent_cell.appendChild(current_link);


>   
  
~~~javascript
  
current_link = document.createElement("a");  
current_link.appendChild(document.createTextNode(line.childNodes[i].text));  
current_link.href = line.childNodes[i].getAttribute("link");  
mycurrent_cell.appendChild(current_link);  

viele Grüße

Axel