In javascript , to modify the attributes of an html element or add-you must use the function setAttribute(name, value);
:
Sets the value of an attribute in the indicated element. If he
attribute already exists, the value is updated, otherwise, the
New attribute is added with the name and value indicated.
Syntax
Element.setAttribute(name, value);
name
A DOMString indicating the name of the attribute whose value is going to
change. The name of the attribute is automatically converted to
lowercase when setAttribute () is called over an HTML element in a
HTML document.
value
A DOMString that contains the value to assign to the attribute. Any
indicated value that is not a text string becomes
automatically in a text string.
Documentation.
Keeping in mind the documentation, try this:
var monto_inp = document.createElement("input");
monto_inp.setAttribute("type","number");
monto_inp.setAttribute("max",100);
monto_inp.setAttribute("min",2);