Got the solution:
<script language="javascript" src="http://code.jquery.com/jquery-1.4.2.min.js" type="text/javascript" ></script>
<script language="javascript" src="http://jquery-joshbush.googlecode.com/files/jquery.maskedinput-1.2.2.min.js" type="text/javascript" ></script>
<script language="javascript" type="text/javascript">
jQuery(function($){
$("input[title='Number']").mask("(999) 999-9999",{placeholder:"#"}).val("(###) ###-####");
});
</script>
Here "Number" is the field name.