Skip to content

原生js动态添加css,js,支持同时添加多个js或者css

Notifications You must be signed in to change notification settings

yangzeyanlove/dynamicLoad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

dynamicLoad

如何使用

  1. 加载css
import dynamicLoad from './dynamicLoad.js'

dynamicLoad.loadStyle('a.css')
dynamicLoad.loadStyle(['a.css', 'b.css'])
  1. 加载JavaScript
import dynamicLoad from './dynamicLoad.js'

dynamicLoad.loadScript([
  'a.js',
  'b.js'
], function () {
  // do something ...
})

About

原生js动态添加css,js,支持同时添加多个js或者css

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published