Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Revisions

1 of 2
Brandon J. Boone
  • 16.5k
  • 4
  • 78
  • 103

Why not use insertAdjacentHTML?

Example

JS

function MinMax() {
 document.getElementById("EditorArea").insertAdjacentHTML('beforeend',"<table border= 1px><tr><td>Element</td><td><input type='textbox'/></td></tr><tr><td>Marked as</td><td><input type='textbox'/></td><tr><td>Min</td><td><input type='textbox'/></td><tr><td>Max</td><td><input type='textbox'/></td><tr><td>Преди ремонт</td><td><input type='textbox'/></td><tr><td>След ремонт</td><td><input type='textbox'/></td><tr><td>Time before</td><td><input type='textbox'/></td><tr><td>Time after</td><td><input type='textbox'/></td></table>");
};
function ShowDate() {
 document.getElementById("EditorArea").insertAdjacentHTML('beforeend', "<p class='dateTime' style='width:120px; border: 2px solid black'>DateTime</p>");
}
Brandon J. Boone
  • 16.5k
  • 4
  • 78
  • 103

AltStyle によって変換されたページ (->オリジナル) /