I would like to put variable FLC in inside $("#FNC").html(''); but don't know how to, any tips?
DEMO:
var FLV = $("#random-input-box").val();
$("#FNC").html('<input id="random-input-box" style="width: 99px;" value="FLC" disabled="disabled" />');
Did you mean putting the value of FLV into the value attribute of the input field?
var FLV = $("#random-input-box").val();
$("#FNC").html('<input id="random-input-box" style="width: 99px;" value="'+FLV+'" disabled="disabled" />');
String concatenation is dangerous without input validation.
Just use .val() to set the input's value, and ideally use jQuery's constructor rather than .html() to create it:
var FLV = $("#random-input-box").val();
$('#FNC').empty();
$('<input id="random-input-box" style="width: 99px;" disabled="disabled" />')
.val(FLV).appendTo('#FNC');
typeattribute. 3. the value that you are trying to use for the input has FLC, while the variable was called FLV. 4. papaiatis has show the correct way to add the variable's value withvalue="'+FLV+'"