var back = function(){
cxt.beginPath();
cxt.fillStyle = "#ccc";
cxt.font = "14px Arial";
cxt.fillText('返回',950,15);
cxt.fill();
cxt.closePath();
cxt.strokeStyle = '#ccc';
cxt.moveTo(985 ,5);
cxt.lineTo(995,10);
cxt.lineTo(985 ,16);
cxt.lineWidth = 1;
cxt.stroke();
}
back();
请问我怎么实现点击“返回”跳转到另外的页面,谢谢
<button onclick="back()"></button>
function back(){
window.location.href="https://www.imooc.com/qadetail/173921";
}
onclick