0
어떻게 자리 표시 자의 색을 흰색으로 변경합니까? -moz-placeholder를 사용해야한다는 것을 알고 있지만 JAVASCRIPT로 포맷하는 방법을 모르겠습니다. 내가 자바 스크립트의 형식으로 아래에있는 코드와 일치해야합니다.자바 스크립트 형식의 자리 표시 자 색상을 변경하는 방법은 무엇입니까?
//User Name Input
var inputUserName = document.createElement("input");
inputUserName.type = "text";
inputUserName.style.bottom = "220px";
inputUserName.style.width = "170px";
inputUserName.style.height = "20px";
inputUserName.style.left = "50px";
inputUserName.style.textAlign = "center";
inputUserName.style.display = "none";
inputUserName.style.backgroundColor = "transparent";
inputUserName.style.borderBottom = "2px solid black";
inputUserName.style.borderTop = "transparent";
inputUserName.style.borderLeft = "transparent";
inputUserName.style.borderRight = "transparent";
inputUserName.placeholder = "User Name";
inputUserName.style.color = "white";
inputUserName.style.position = "absolute";
inputUserName.className = "UserNameSignUp";
inputUserName.UserNameSignUp = "-moz-placeholder";
//input.className = "css-class-name"; // set the CSS class
formArea.appendChild(inputUserName); // put it into the DOM