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

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

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