Skip to content

replace5/runHtmlWithScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

runhtml

把带有script标签的字符串插入到dom,全部插入完成后(如果有引用外部js文件,会等到所有外部js文件加载完成)回调 ####demo:

function success() {
    console.log('success');
}
function error() {
    console.log('error');
}
var html = '<div>abc</div><script>var a = 12;</script><script http://code.jquery.com/jquery-2.1.1.js></script>';
runHtmlWithScript(document.body, html, success, error);

About

插入带有script标签的html字符串并回调

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published