Add More Reset Button

In the Add More Reset Button script is use to create one or more a reset button dynamically through DOM.

Demo :



Reset : 

Example :

You click a Add More Button and see more reset button at broswer.

Code :

Following code is Add More Reset Button Script code if you need to copy and use to your web site.


<script type="text/javascript">
var resetCount = 0;
function addreset (parentEl)
{
  if (!parentEl)
  {
    return false;
  }
  parentEl = document.getElementById(parentEl);
  if (parentEl == null)
  {
    return false;
  }
  var newreset = document.createElement("input");
  newreset.type = "reset";
  newreset.id = "myreset"&++resetCount;
  newreset.name = "myreset";
  newreset.value = "Reset";
  newreset.className='reset_box';
  parentEl.appendChild(newreset);
  return false;
}
</script>
<fieldset id="someresets" class="resetset">
   <legend><input type="reset" value="Reset" ></legend>
</fieldset>
  <input type="button" value="Add More" onclick="return addreset('someresets');" >

In the above addreset() function is use to create one or more a reset button.That functions have one arguments that is parentEl.document.createElement("input") is generate a input reset button and resetCount variable is use to create to child reset box id.appendChild() function is use to replace dom object into original reset box.

Free Download Script:

If you need to Add More Reset Button Script click and download from following zip file.

Download




Content