我了一个网站的
http://img4.tuniucdn.com/w/j/2015021006/common/commonV2.js,WAP.js,doCookie_v2.js,common/dialog.js,index.js,new/modules/spread/installapp.js
比如说这个URL是什么原理使它可以同时引入多个js,拆分这个url又能单独打开如
http://img4.tuniucdn.com/w/j/2015021006/common/commonV2.js
http://img4.tuniucdn.com/w/j/2015021006/WAP.js
   

解决方案 »

  1.   

    后台将url上的js对应的文件拼接起来输出
      

  2.   

    http://a.b.c/a.js,b.js,c.js
    假设这条链接对应的js路径为[path/a.js,path/b.js,path/c.js]
    程序读取链接上的参数找到对应的路径 用io操作将文件内容读出来输出
    string[] a=read path from params
    for(int i=0;i<a.length;i++)response.write file.readtext(convertPath(a[i]))
      

  3.   


    感谢指点,我去研究学习一下
    string[] a=read path from params
    for(int i=0;i<a.length;i++)response.write file.readtext(convertPath(a[i]))
    这段程序应该写在什么位置,IO操作是什么?不懂