jsp 中调用 js 文件方法问题

来源:百度知道 编辑:UC知道 时间:2024/06/23 00:09:50
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@include file="taglib.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>notice</title>
<script language="javaScript" src="/WEB-INF/js/notice.js" type="text/javascript">
</script>
</head>
<body> 
<%@include file="head.jsp"%>
<hr><br>
欢迎您 <bean:write name="k"/>
<hr>
<div align="center">
<table border="

给你写一个例子:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script>
function isSub(){
if(confirm("确定提交吗?")){
return true;
}else{
return false;
}
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="" onsubmit="return isSub();">
<label>
<input type="submi