bind in javascript

JavaScript
func.bind(this)bind() returns a bound function that, when executed later, will have the correct context ("this") for calling the original function.<html>
<input type="button" id="btnSubmit" name="btnName" class="btnclass" value="Click Me" />
</html>

$('input[name="btnName"]').click(function(){
    //do stuff
});
Source

Also in JavaScript: