Increase Decrease Quantity Button
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Increase Decrease Button </title> <script type="text/javascript"> function incre(){ document.getElementById("qty").value++; } function decre(){ var ckVal = document.getElementById("qty").value; if(ckVal > '0') { document.getElementById("qty").value--; } } </script> </head> <body> <form name="DemoForm"> <input type='button' class="pull-left" name='incre' onclick='incre();' value='+'/> <input type='text' name='qty' value="1" id='qty' style="width:65px;" size="3" class="pull-left" /> <input type='button' class="pull-left" name='decre' onclick='decre();' value='-'/> </form> </body> </html>
Advertisements
Add Comment
📖 Read More
- 1. Magento get current controller ,current module , current action and route name
- 2. Magento Custom Collection Sorting | Magento sort collection Item
- 3. can't retrieve entity config magento
- 4. Magento get current customer id
- 5. Magento get current date time
- 6. Fatal error: Call to a member function setSaveParametersInSession() on a non-object in \mage\app\code\core\Mage\Adminhtml\Block\Widget\Grid\Container.php on line 66
- 7. magento admin system configuration 404
- 8. Item with the same id already exist magento collection
- 9. Magento cron not working
- 10. Exception 'Mage_Core_Exception' with message 'Invalid callback: