javascript - Custom spinners input type number without js -


I need to create input type = "number" with custom spinners. It should be

Enter image details here 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

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -