שפת א — א2

קוד חיפוש

HTML שנוצר

עדיין לא נוצר HTML.
\n" + ""; document .getElementById("result") .textContent = fullHTML; } function escapeHTML(text) { return String(text) .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """) .replace(/'/g, "'"); } function showError(message) { document .getElementById("result") .innerHTML = "
" + escapeHTML(message) + "
"; } function copyHTML() { var text = document .getElementById("result") .textContent; if ( text.trim() === "" ) { return; } if ( navigator.clipboard && navigator.clipboard.writeText ) { navigator.clipboard .writeText(text) .then(function () { alert("ה-HTML הועתק"); }) .catch(function () { fallbackCopy(text); }); } else { fallbackCopy(text); } } function fallbackCopy(text) { var textarea = document.createElement("textarea"); textarea.value = text; textarea.style.position = "fixed"; textarea.style.left = "-9999px"; document.body.appendChild( textarea ); textarea.focus(); textarea.select(); try { document.execCommand("copy"); alert("ה-HTML הועתק"); } catch (error) { alert("ההעתקה נכשלה"); } textarea.remove(); }