C# 直接引用js文件,调js里的数据

 

 

    C# 直接引用js文件,调js里的数据

 引入命名空间 using System.IO;
 

string path = AppDomain.CurrentDomain.BaseDirectory + "/content/js/branddata.js";
string str2 = File.ReadAllText(path);

path:js所在的路径

str :js文件里的数据

posted @ 2019-04-01 22:22  厦门哈韩  阅读(625)  评论(0)    收藏  举报