bind in javascript

JavaScript
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
});func.bind(this)
Source

Also in JavaScript: