易截截图软件、单文件、免安装、纯绿色、仅160KB

简单Ajax与JSP相结合页面

环境:Ajax+JSP,Tomcat5.05
参考:http://www.w3cschool.cn/index-24.asp.htm
文件:testAjax.html
<!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>
<body>
<mce:script type="text/javascript"><!--
function ajaxFunction(){
var xmlHttp;
try{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}catch (e){
// Internet Explorer
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}catch (e){
alert("您的浏览器不支持AJAX!");
return false;
}
}
}
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
document.myForm.time.value=xmlHttp.responseText;
}
}
xmlHttp.open("GET","time.jsp",true);
xmlHttp.send(null);
}
function clearText(){
document.myForm.time.value="";
}
// --></mce:script>
<form name="myForm">
用户: <input type="text" name="username" onMouseOver="ajaxFunction()" onMouseOut="clearText()" size="50">
<p>
时间: <textarea name="time" rows="5" cols="50"> 
time.jsp
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!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>
</head>
<body>
<%
java.io.PrintWriter myOut = response.getWriter();
java.util.Date d = new java.util.Date();
java.text.SimpleDateFormat f = new java.text.SimpleDateFormat("yyyy年MM月dd日 hh:mm:ss");
myOut.print(f.format(d));
myOut.flush();
my


相关文档:

在JSP中配置FCKeditor 2.6.4

1.FCKeditor 介绍
FCKeditor 这个开源的HTML 文本编辑器可以让web 程序拥有如MS Word 这样强大的编辑功能,.FCKeditor 支持当前流行的浏览器。
2.准备工作:
环境:winddows XP、tomcat6.0、JDK1.6
下载:
1):FCKeditor_2.6.4.zip
地址:http://nchc.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.6.4.zip ......

ajax创建XMLHttpRequest对象

function ajaxFunction()
{
var xmlHttp;

try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
......

ASP.NET Ajax中Sys未定义错误解决方案

在web.config中修改修改属性
1:<configSections><configSections>中加下面代码
 <configSections>
  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral ......

接触Ajax的第一个实验Hello Word

<html>
<head>
<title>new ajax</title>
<mce:style type="text/css"><!--
body{
margin-top:50px;
}
.MyDiv{
font-size:12px;
border:1px solid #DDD;
background-color:#FFD;
margin:2px;
width:200px;
}

--></mce:style><style type="t ......

Jsp连接MSSQL2000的两种方法


Jsp连接MSSQL2000的两种方法
最近在学习JSPWeb(Tomcat服务器)应用开发和基于Weblogic和Myelcipse的JEE5的开发,在学习过程中涉及到连接SQL 2000 数据库时,由于软件环境的差异性和一些版本问题,花了好大功夫才连上,所以在此作个总结,希望能给大家一些帮助,不要在基本的东西上花费太多的时间。
方法一:利用SQL Se ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号