<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="com.test.SendTest"%>
<!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=gb2312">
<title>无标题文档</title>
</head>
<SCRIPT LANGUAGE="JavaScript">
function send()
{
document.write("haha");
document.write("<%SendTest st = new SendTest()%>");
document.write("<st.str()>");
document.write("haha");
}
</script>
<body><input type="button" NAME="Button" VALUE="单击这里看看效果" onclick="send()"></body>
</html>
<%@ page import="com.test.SendTest"%>
<!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=gb2312">
<title>无标题文档</title>
</head>
<SCRIPT LANGUAGE="JavaScript">
function send()
{
document.write("haha");
document.write("<%SendTest st = new SendTest()%>");
document.write("<st.str()>");
document.write("haha");
}
</script>
<body><input type="button" NAME="Button" VALUE="单击这里看看效果" onclick="send()"></body>
</html>
解决方案 »
- 请教加载纯Java数据库驱动程序问题。
- dojo中TabContainer的问题,ajax高手进!!
- 用div锁定页面
- 怎样实现在数据库读出的日期数据以2005年3月30日的格式显示!
- 为什么出现这种问题
- 用weblogic6.0 。 javabean 被编译后该放在哪个目录下?
- jsp:useBean的问题送分啊,兄弟姐妹门COME ON
- 操作不允许: Unsupported syntax for refreshRow()是什么原因?
- javascript 和 jsp 的问题(在线等)
- web jsp jstl el 遍历 Map<Object.List<Object>> 如何遍历
- 为什么会出现这样的问题????
- 如何判断excel中指定的工作表是否有数据?
要加一个分号,表示语句结束
("<%SendTest st = new SendTest();%>");
而javascript是客户端执行的
这样改试试:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="com.test.SendTest"%>
<!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=gb2312">
<title>无标题文档</title>
</head>
<SCRIPT LANGUAGE="JavaScript">
function send(haha)
{
document.write(haha);
}
</script>
<body><input type="button"
NAME="Button"
VALUE="单击这里看看效果"
onclick="send('<%=new SendTest().str()%>')"></body>
</html>