Gnuplot 莫乔利斯不';t加载绝对javascript和CSS文件
我正在尝试使用Gnuplot创建“canvas”HTML文档。当我把一个放到public/中时,Mojolicious在/usr/share/gnuplot/gnuplot/5.2/js中的javascript和CSS文件上生成404。在不修改HTML输出的情况下,如何正确加载这些文件 HTML内容:Gnuplot 莫乔利斯不';t加载绝对javascript和CSS文件,gnuplot,mojolicious,Gnuplot,Mojolicious,我正在尝试使用Gnuplot创建“canvas”HTML文档。当我把一个放到public/中时,Mojolicious在/usr/share/gnuplot/gnuplot/5.2/js中的javascript和CSS文件上生成404。在不修改HTML输出的情况下,如何正确加载这些文件 HTML内容: <!DOCTYPE HTML> <html> <head> <title>Gnuplot Canvas Graph</title> &l
<!DOCTYPE HTML>
<html>
<head>
<title>Gnuplot Canvas Graph</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->
<script src="/usr/share/gnuplot/gnuplot/5.2/js/canvastext.js"></script>
<script src="/usr/share/gnuplot/gnuplot/5.2/js/gnuplot_common.js"></script>
<script src="/usr/share/gnuplot/gnuplot/5.2/js/gnuplot_dashedlines.js"></script>
...
</html>
我知道它正在将这些文件路径转换为URL,但我不知道如何解决这个问题。gnuplot canvas终端有一个选项“jsdir”,正是出于这个原因:
gnuplot> set term canvas jsdir 'http://wherever/the/scripts/live/'
然后,输出*.html包含如下行
<!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->
<script src="http://wherever/the/scripts/live/canvasmath.js"></script>
<script src="http://wherever/the/scripts/live/gnuplot_common.js"></script>
<script src="http://wherever/the/scripts/live/gnuplot_dashedlines.js"></script>
<script src="http://wherever/the/scripts/live/gnuplot_mouse.js"></script>
自我提示:RTFM!
<!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->
<script src="http://wherever/the/scripts/live/canvasmath.js"></script>
<script src="http://wherever/the/scripts/live/gnuplot_common.js"></script>
<script src="http://wherever/the/scripts/live/gnuplot_dashedlines.js"></script>
<script src="http://wherever/the/scripts/live/gnuplot_mouse.js"></script>