javascript - cannot create object in IE using new Keyword -


var com = {}; var com.project = function(){    this.display = function(){    alert("hai.....");    } } var project_obj = new com.project(); 

while creating project_obj got error in ie9 "object doesn't support action"

this code working in firefox , chrome. have given sample code. i'm trying use classes , package concept in javastript.

i don't know why error came in ie.

this illegal in browsers , raises syntax error :

var com.project = function(){ 

you may :

var com = {}; // whatever com.project = function(){ 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -