I have a input where I'll put the word
'Party:'
function go() {
var c = document.getElementById("mm");
var part = "Party: ";
var partC = part.fontcolor("black");
var f = c.value = partC;
}
<input type="button" id="goes" onclick="go()">
<input type="text" id="mm">
The problem is that I see the structure of the font and not just the string, what is the problem?
Edit: Yes I do
var f = c.value = part;
It will come out
'party'
, but without the color changed.
SECOND EDITION: I do not want to apply the whole value to only the string, this is the complete code:
$(document).ready(function(){
$('#gParty').on("click", function(){
var c = document.getElementById("partyCode");
var part = "Party: ";
var partC = part.fontcolor("black");
var d = c.value = partC+selectedServer;
var e = c.style.textAlign = 'center';
var f = c.style.color = "red";
var p = c.style.fontFamily = "Ubuntu";
var i = c.style.fontSize = "larger";
console.log(c);
}