怎么在html中输出js文件中的变量

2025-02-23 06:20:56
推荐回答(1个)
回答1:

sample.js 中
var type = 1;
HTML中
function xxx(){
var type2 = type;
}