JavaScript 将多个引用(样式或者脚本)放入一个文件进行引用

时间:2024-04-06 20:34:54

1、将样式放入一个文件进行引用

@import url("../media/css/bootstrap.min.css");
@import url("../media/css/bootstrap-responsive.min.css");
@import url("../media/css/font-awesome.min.css");
@import url("../media/css/style-metro.css");
@import url("../media/css/style.css");
@import url("../media/css/style-responsive.css");
@import url("../media/css/default.css");
@import url("../media/css/uniform.default.css");
@import url("../media/css/bootstrap-fileupload.css");
@import url("../media/css/chosen.css");
@import url("../media/css/profile.css");

2、将脚本放入一个文件进行引用

// 初始化脚本

    document.write('<script src="../../media/js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>');
document.write('<script src="../../media/js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>');
document.write('<script src="../../media/js/bootstrap.min.js" type="text/javascript"></script>');
document.write('<script type="text/javascript" src="../../media/js/bootstrap-datetimepicker.js" ></script>');
document.write('<script src="media/js/excanvas.min.js"></script>');
document.write('<script src="media/js/respond.min.js"></script>');
document.write('<script src="../../media/js/jquery.uniform.min.js" type="text/javascript"></script>');
document.write('<script type="text/javascript" src="../../media/js/bootstrap-fileupload.js"></script>');
document.write('<script type="text/javascript" src="../../media/js/chosen.jquery.min.js"></script>');