第一种解决方案是使用多个js文件,下面这个文章介绍了着个做法
http://dcao.javaeye.com/blog/513944
第二种解决方案参看:
http://blog.csdn.net/chen_xizhang/article/details/5952401