有任何解决方法使用“画布”的标签在IE7和IE8? 请让我知道。
<input type="text" id="textSign" value="Sign" />
<input type="button" onclick="javascript:return changeSign();" value="changeSign" />
<canvas id="e" width="150" height="100"></canvas>
<script type="text/javascript">
var textSign = document.getElementById("textSign").value;
function changeSign() {
textSign = document.getElementById("textSign").value;
var canvas = document.getElementById("e");
var context = canvas.getContext("2d");
context.fillStyle = "#4c4c4c";
context.font = "30px Giddyup Std";
context.fillText (textSign , 20, 50);
}
</script>