html中引入单独的js

html中引入单独的js

1、html引用

<script src="/page/utils/open.js"></script>
<script type="text/javascript">
    test1('3333333', '555');
</script>

2、js文件内容(open.js)

function test1(msg, logUserCode){
    console.log("111111111100ccc", msg);
    console.log("111111111100ddd");
    alert('999');
    
}

你可能感兴趣的:(javascript,html,开发语言)