请教: (很菜,但我真的没办法)
<%@page contentType="text/html; charset=GB2312"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<script language="javascript">
function save(id){
alert(id);
}
</script>
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--">
<%
String test="www";
%>
<input type="submit" value="提交" name="A" onclick="javascript:save(<%=test%>);">
</form>
</body>
</html>
为什么会出错呢?
而如果把test定义成中文或数字又都不一样了。