글꼴 크기 기능도있는 워드 프로세서를 만들고 싶었습니다. 문제는 테스트 할 때 글꼴 크기가 변경되지 않는다는 것입니다.
function size() {
console.log("Font size changed");
let fontSize = document.getElementById("fontsizeInput");
document.getElementById("editor").style.fontSize = document.getElementById("fontsizeInput");
};
<input type="text" id="fontsizeInput" class="fontinput" style="width: 33px;" maxlength="3">
<button class="btn" id="sizeOK" onclick="size()"><i class="fas fa-check"></i></button>
document.getElementById("editor").style.fontSize = document.getElementById("fontsizeInput").value+"px"
.value를 사용하고 그 뒤에 "px"를 추가합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다