<script> var Form=function(){}; Form.prototype.nvalue=function() { alert("J work"); } var myform = new Form(); myform.nvalue(); </script>