我很抱歉再次提出这个问题我发现哪些代码行不起作用有人可以帮我解决问题吗?
这是错误
Uncaught ReferenceError: html2canvas is not defined
at HTMLInputElement.renderContent ((index):83)
renderContent @ (index):83
索引83是
html2canvas([document.getElementById('myid')], {
这是画布
function renderContent() {
html2canvas([document.getElementById('myid')], {
allowTaint: true
}).then(function (canvas) {
result.appendChild(canvas);
download.style.display = "inline";
download.href = result.children[0].toDataURL();
});
}
脚本src
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
<script src="https://files.codepedia.info/uploads/iScripts/html2canvas.js"></script>