Google AJAX 语言 API 翻译代码
<!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>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("language", "1");
function initialize(word,resultID)
{
google.language.detect(word, function(result)
{
if (!result.error && result.language)
{
google.language.translate(word, result.language, "en",function(result) {
var translated = document.getElementById(resultID);
if (result.translation) {
translated.innerHTML = result.translation;
}
});
}
});
}
function fanyi()
{
var text = document.getElementById("word").value;
&nbs
相关文档:
最近网上提的很多的一个新概念就是 AJAX 了, 那么, AJAX 是什么呢? 以下内容引用网上资料:
AJAX全称为“Asynchronous JavaScript and XML”(异步JavaScript和XML),是指一种创建交互式网页应用的网页开发技术。它有机地包含了以下几种技术:
Ajax(Asynchronous JavaScript + XML)的定义
基于 web标准(sta ......
jsp的代码:
<%
@ page contentType
=
"
text/html; charset=GBK
"
import
=
"
java.util.*,com.wehave.hyerp.procurement.domain.Cgsqd
"
%>
<%
@ taglib uri
=
"
struts-html
"
prefix
=
" ......
Ajax------很多程序员都喜欢玩这个东西,觉得很是高深莫测,而且越是痛苦越钟爱,我发现这是程序员的通病,好像不折磨自己不足以享受这么美好的生活,Ajax很火,确实很火,火到什么程度我已经不大清楚,在当时我学程序的那个年代它甚至超过spring,struts等等主流的框架,天哪微软和SUN都很担心,但是时间证明Ajax仅仅只是个这些程序员 ......
What is AJAX
This section is for those who have no idea what AJAX is. If you don’t fall into this category, feel free to skip to the next section.
AJAX stands for asynchronous JavaScript and XML. If you see another term XHR, which is shorthand for XML HTTP request, it’s the same thing. ......