1、集成
- npm:
npm install eruda --save
- CDN
<script src="//cdn.bootcss.com/eruda/1.3.0/eruda.min.js"></script>
<script>eruda.init();</script>
2、使用
add this to your page
<script src="node_modules/eruda/eruda.min.js"></script>
<script>eruda.init();</script>
3、example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>
</head>
<body >
<h1>one</h1>
</body>
<script>
window.onload=function(){
myAlert();
}
function myAlert() {
console.log('dededededededededed');
}
</script>
</html>