开发者

hyperlink text on a canvas in html5 [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Create links in HTML canvas

I have filled text in a html5 canvas using

window.onload = function() {
            var theCanvas = document.getElementById('Canvas1');
            if (theCanvas && theCanvas.getContext) {
                var ctx = theCanvas.getContext("2d");
 开发者_StackOverflow社区               if (ctx) {
                                                ctx.fillStyle = "yellow";

                    ctx.fillText("INDEX",325,105);
                    }}}

Now i want to hyperlink whatever text i have entered how do i do that? Thank you


Short of creating a system that parses the text for hyperlinks, measures its position and checks for clicks on it, you can't.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜