单独js文件中el不能获取,通过以下方式获取
1 var location = (window.location+'').split('/'); 2 var basePath = location[0]+'//'+location[2]+'/'+location[3]; 3 var url = basePath + '/js/xxx.js';
单独js文件中el不能获取,通过以下方式获取
1 var location = (window.location+'').split('/'); 2 var basePath = location[0]+'//'+location[2]+'/'+location[3]; 3 var url = basePath + '/js/xxx.js';