“序列化”后“反序列化”,能完美解決你遇到的問題var a = [{a: 1,b: 2}]var b = JSON.parse(JSON.stringify(a));
b[0].a = 4console.log(a)$('#uploadVideo').change(function(event) { var video = this.files[0]; var videoUrl = window.URL.createObjectURL(video);
$('.ql-editor').append('<video><source src="'+videoUrl+'"></video>');
});<input type="file" id="uploadVideo" accept="video/*"></div><div class="ql-editor" contenteditable="true"></div>更新:我已經可以取得預覽網址了但是我發現丟入<video>XXX網址</video>不行。只會出現 <br><strong>Strong text!</strong>卻可以請問要怎麼讓整段 <video> 標籤進入?甚至我直接丟進去 ql-editor 可以直接顯示影片?(直接啟用HTML)?
“序列化”后“反序列化”,能完美解決你遇到的問題
江戶川亂折騰
2018-08-23 15:34:05