1.引用
NuGet安装:
Selenium.Support
Selenium.WebDriver
Selenium.WebDriver.PhantomJS.CrossPlatform (分布Linux时把对应PhantomJS复制到发布目录)
2.后台打开的页面
@{ Layout = "/Views/Shared/Ordinary.cshtml"; ViewData["Title"] = "图表模版"; } @section css{ <link href="@ViewBag.url/lib/bootstrap/dist/css/bootstrap.css" rel="stylesheet" /> } <div id="chartmain" class="col-lg-12 col-sm-12" style="height:400px;width:600px;"></div> <script src="@ViewBag.url/lib/jquery/dist/jquery.js"></script> <script src="@ViewBag.url/js/echarts.min.js"></script> <script type="text/javascript"> var time = [];