I am trying to create a input element with a expected html output of this:
<input
type="text"
maxlength="13"
value="DD/MM/YY 00:00.0"
onkeypress="dateTime()"
>
I tried doing this with the following jQuery code
var input = $("<input>",
{
name : newName,
maxlength : newSize,
size : newSize,
type : 'text',
value : newVal,
onkeypress : dateTime()
});
But I don't get the expected output
<input type="text" maxlength="13" value="DD/MM/YY 00:00.0">
Question 1 : what is the description of this code, because I cannot for the life of me find anything in the jQuery documentation about this stuff (link would be appreciated).
Question 2 : what is the correct parameter to use to get my expected html result?
jquery.com?