Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/04/2013, 18:26
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: como se llama este control y donde poder bajarlo

Esa es una función básica de javascript, no hace falta plugín alguno para eso.
Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="es-ar">
  3. <meta charset="utf-8" />
  4. <title>Sumar-Restar</title>
  5. <style type="text/css">
  6. /*<![CDATA[*/
  7. input[type='button']{
  8. background: lime; border: solid 1px transparent; border-radius: 4px; font-weight: bold; cursor: pointer;
  9. }
  10. /*]]>*/
  11. <script type="text/javascript">
  12. //<![CDATA[
  13. function suma_resta(s){
  14. var valor = parseInt(document.getElementById('cantidad').value);
  15. if(s == '+'){
  16. document.getElementById('cantidad').value = valor+1;
  17. }else{
  18. if(valor !== 0){
  19. document.getElementById('cantidad').value = valor-1;
  20. }
  21. }
  22. }
  23. //]]>
  24. </head>
  25. <form action="#">
  26. <input type="text" size="2" id="cantidad" value="0" readonly/> <input type="button" value="+" onclick="suma_resta('+')" /> <input type="button" value="-" onclick="suma_resta('-')" />
  27. </form>
  28. </body>
  29. </html>
Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.