在jsp中,js应放到<head></head>或<body></body>中,放到外部,访问不到js中的函数。
例如:
<head>
function d(){
alert()
}
</head>
<body>
<input type="button" value="点击" οnclick="d()"/>
</body>
例如:
<head>
function d(){
alert()
}
</head>
<body>
<input type="button" value="点击" οnclick="d()"/>
</body>