Coder Social home page Coder Social logo

jsvideo's Introduction

JavaScript录屏和回放

插件没有任何参数,下面是初始化代码,在内部就已经打开监控,开始录制。

const video = new JSVideo();

下面是一个简单的示例,修改两个文本框中的属性或值。

const input = document.querySelector("[name=name]"),
    mobile = document.querySelector("[name=mobile]");
//修改placeholder属性
setTimeout(function() {
    input.setAttribute("placeholder", "name");
}, 1000);
//setTimeout(function() {
//    input.setAttribute("autocomplete", "on");
//}, 2000);
//修改姓名的value值
setTimeout(function() {
    input.value = "Strick";
}, 3000);
//修改手机的value值
setTimeout(function() {
    mobile.value = "13800138000";
}, 4000);
//在iframe中回放
setTimeout(function() {
    video.createIframe();
}, 5000);

关于插件的原理,可参考《纯JavaScript实现页面行为的录制》一文。

jsvideo's People

Contributors

pwstrick avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.