javascript - Custom spinners input type number without js -
I need to create input type = "number" with custom spinners. It should be
How can I do without JS? Or need JS?
You must use javascript / jquery for spinner you can use the jQuery user interface plug-in . .
In the case of the plugin you need to customize it as needed, the arrows can be changed and can be moved by CSS styling.
Or you can just try this:
HTML:
& lt; An id = "bottom" href = "#" onclick = "updated spinner (this);" & Gt; - & lt; / A & gt; & Lt; Input id = "content" value = "0" type = "text" style = "width: 30px" /> & lt; An id = "top" href = "#" onclick = "updateSpinner (this);" & Gt; + & Lt; / A & gt;
CSS:
A {text-decoration: none; Javascript: function updatespinner (obj) {var contentObj = document.getElementById ("content"); Var value = parseInt (contentObj.value); If (obj.id == "below") {value--; } And {value ++; } ContentObj.value = Value; }
I am working on it can be seen on this.
Comments
Post a Comment