สอบถามการอ้างอิงตัวแปร

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: สอบถามการอ้างอิงตัวแปร

สอบถามการอ้างอิงตัวแปร

โดย Ik Kat » 05/10/2017 5:57 pm

ต้องการสร้างตัวแปร canvas และให้อ้างอิงไปที่ this._text_canvas สามารถใช้คำสั่งอะไรได้บ้างค่ะ

โค้ด: เลือกทั้งหมด

Plugin.prototype = {
        init: function () {
            this._text = $(this.element).find(".picedit_textbox");
            this._text_canvas = this._text.children("canvas")[0];
            this._text_ctx = this._text_canvas.getContext("2d");
            };
            };

ข้างบน