解決方法就是把 ctx.drawImage( "這邊帶入的物件", 0, 0);
帶入的物件的crossOrigin屬性要設為anonymous
※ 必須在一開始就要加上anonymous
ex:

dizzy03 發表在 痞客邦 留言(0) 人氣()

跟settimeout()的差別是,settimeout()只會執行一次,而setInterval()會重覆執行,直到clearInterval()被呼叫或視窗被關閉。
轉自 http://www.w3school.com.cn/htmldom/met_win_setinterval.asp
--

dizzy03 發表在 痞客邦 留言(0) 人氣()

轉自 https://blog.csdn.net/qq_35844177/article/details/79094249
--
直接看代码

dizzy03 發表在 痞客邦 留言(0) 人氣()


轉自 http://anrine910070.pixnet.net/blog/post/225121553
--
2019年行事曆 (民國108年行事曆),行政院人事行政局已經於7/2日公布囉!
2019年過年春節、清明節、寒暑假、中秋節等連續假期有哪些吧,想必大家已經迫不及待了吧~
2019年將有 7 大連假,元旦 (4天)農曆過年 (9天)228紀念日 (4天)清明節連假 (4天)
端午節 (3天)
中秋節 (3天)國慶日 (4天),擬訂請假攻略善用特休,長途旅行輕而易舉呢~

除了2019年連假請假攻略外,波比在明年還會後製一份結合2019農民曆重要節令的桌曆,
方便自己和大家規劃旅行、準備拜拜、挑選禮物 (七夕、立冬、冬至等節日都有喔),
總之想放鬆、愛旅遊、忙家務的人快來看看吧,新的一年和波比繼續一起吃喝玩樂,GO~
---
No.12019年行事曆總瀏覽

dizzy03 發表在 痞客邦 留言(0) 人氣()

轉自 https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML
--

The insertAdjacentHTML() method parses the specified text as HTML or XML and inserts the resulting nodes into the DOM tree at a specified position. It does not reparse the element it is being used on, and thus it does not corrupt the existing elements inside that element. This avoids the extra step of serialization, making it much faster than direct innerHTMLmanipulation.


SyntaxSection


element.insertAdjacentHTML(position, text);

ParametersSection


position
DOMString representing the position relative to the element; must be one of the following strings:

  • 'beforebegin': Before the element itself.

  • 'afterbegin': Just inside the element, before its first child.

  • 'beforeend': Just inside the element, after its last child.

  • 'afterend': After the element itself.


text
text is the string to be parsed as HTML or XML and inserted into the tree.

Visualization of position namesSection


<!-- beforebegin -->
<p>
<!-- afterbegin -->
foo
<!-- beforeend -->
</p>
<!-- afterend -->

Note: The beforebegin and afterend positions work only if the node is in the DOM tree and has a parent element.

ExampleSection


// <div id="one">one</div>
var d1 = document.getElementById('one');
d1.insertAdjacentHTML('afterend', '<div id="two">two</div>');
// At this point, the new structure is:
// <div id="one">one</div><div id="two">two</div>

NotesSection


Security ConsiderationsSection


When inserting HTML into a page by using insertAdjacentHTML be careful not to use user input that hasn't been escaped.


It is not recommended you use insertAdjacentHTML when inserting plain text; instead, use the Node.textContent property or Element.insertAdjacentText() method. This doesn't interpret the passed content as HTML, but instead inserts it as raw text.


SpecificationSection













SpecificationStatusComment
DOM Parsing and Serialization
The definition of 'Element.insertAdjacentHTML()' in that specification.
Working Draft 

Browser compatibilitySection


Update compatibility data on GitHub


























DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportFull support1Full support12Full support8Full support7Full support4Full support2.3Full support18Full support12Full support8Full supportYesFull support4Full supportYes


Legend


Full support 
Full support
See implementation notes.
See implementation notes.


See alsoSection



dizzy03 發表在 痞客邦 留言(0) 人氣()

如何自訂video js的onclick事件,不要是預設的"暫停播放"功能
在初始化videojs物件時,去重新定義on click事件,並加上event.preventDefault();就可以停止預設的onclick事件。
--
 

dizzy03 發表在 痞客邦 留言(0) 人氣()

轉自 https://stackoverflow.com/questions/899107/how-can-i-do-width-100-100px-in-css
--
Modern browsers now support the:

dizzy03 發表在 痞客邦 留言(0) 人氣()


轉自 https://chinaqna.com/a/43960?fbclid=IwAR3IYzSqUV8H3reSL9WiH0XNGXBzve83IMAIp-2JGDYrm_GD7dyPd-pWnPI
--
本文來源:國館文化(微信id:guoguan5000)

dizzy03 發表在 痞客邦 留言(0) 人氣()


轉自 http://sweeteason.pixnet.net/blog/post/42655502
--
前言:

dizzy03 發表在 痞客邦 留言(0) 人氣()


轉自 https://www.zoearthmoon.net/blog/program/item/1910.html
--
 

dizzy03 發表在 痞客邦 留言(0) 人氣()

+1
.on('ready.jstree', function (e, data) {
    data.instance.open_node(["id1","id2","id3"]);   // 帶入node的id
    data.instance.select_node(["id1","id2","id3"]);  // 帶入node的id
})

dizzy03 發表在 痞客邦 留言(0) 人氣()

http://api.jquery.com/jQuery.each/
var obj = {

"flammable": "inflammable",

"duh": "no duh"

};

$.each( obj, function( key, value ) {

alert( key + ": " + value );

});

dizzy03 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。