Jsp页面里引入一个javascript文件,在jsp的onclick里怎么添加脚本文件里的方法时间:2023-03-09 18:53:45 举个简单例子:首先新建use.js文件内容:function show(){ alert("aa");} 建html文件跟use.js放同目录下: <html><head><script type="text/javascript" src="use.js"></script></head><body><input type="button" value="点击" onclick="show()"></body></html>