0
如何将占位符的颜色更改为白色?我知道我必须使用-moz占位符,但我不知道如何将其格式化为JAVASCRIPT。我需要在javascript的格式中匹配下面的代码。如何更改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