pixel-editor/_ext/scripts/utilities/getSetText.js

10 lines
352 B
JavaScript
Raw Normal View History

2019-03-27 02:20:54 +03:00
//get text of specified element
function getText(elementId) {
var element = (typeof elementId == 'string' ? document.getElementById(elementId) : elementId);
return element.textContent;
}
function setText(elementId, text) {
var element = (typeof elementId == 'string' ? document.getElementById(elementId) : elementId);
element.textContent = text;
2021-06-27 19:45:32 +03:00
}