mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-10 12:46:15 -08:00
Update Create button in the controls.md
This commit is contained in:
1 parent
c79b41b224
commit
480c3b539f
1 file changed
+3
-1
@@ -8,6 +8,7 @@ sidebar_position: 2
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var time = 0;
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
@@ -17,7 +18,8 @@ var art = new Artplayer({
|
||||
html: '<button type="button">Click Me!</button>',
|
||||
click: function (_, event) {
|
||||
// 第二个参数是事件对象
|
||||
event.target.innerText = 'You Clicked';
|
||||
time += 1;
|
||||
event.target.innerText = 'You Click ' + time;
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user