20080909工作日志

写的好,我收藏起来慢慢看. 写的好,我支持一下. 没什么意思,把他踩下去. 阅读次数:59 | 订阅者:抛出异常的爱 | 来源:天使不喜欢看代码 | 文章作者: 抛出异常的爱 | 发表时间: 2008-09-09



作者: 抛出异常的爱 
链接:http://loveexception.javaeye.com/blog/239735 
发表时间: 2008年09月09日

声明:本文系JavaEye网站发布的原创博客文章,未经作者书面许可,严禁任何网站转载本文,否则必将追究法律责任!

写了一个用google翻译的小工具...
很粗糙...

<html>
<head>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">

google.load("language", "1");

function initialize(aaa) {
var text = document.getElementById('text'+aaa).innerHTML;
google.language.detect(text, function(result) {
if (!result.error && result.language) {
google.language.translate(text, "", "zh-CN",
function(result) {
var translated = document.getElementById("translation"+aaa);
if (result.translation) {
translated.innerHTML = result.translation;
}
});
}
});
}
function fy(aaa){

for(i=1001;i<1009;i++){
setInterval("initialize('"+i+"');", 1000);
google.setOnLoadCallback(initialize);
//alert(i);
}
}

var iNum = 1001;
var iMax = 1010;
var iIntervalId = null;

function incNum()
{
initialize(iNum);
iNum++;
if(iNum > iMax)
{
clearInterval(iIntervalId);
}
}

iIntervalId = setInterval(incNum, 500);
</script>
</head>
<body>
<div style="float:left" id="text1001">probably you have to set the jdbc/mySQL or other driver into following place </div><div ><br/></div><div id="translation1001"></div>
<div style="float:left" id="text1002"> </div><div ><br/></div><div id="translation1002"></div>
<div style="float:left" id="text1003">go to tomcat administration tools, </div><div ><br/></div><div id="translation1003"></div>
<div style="float:left" id="text1004">click tomcat server, then click service(Catalina), </div><div ><br/></div><div id="translation1004"></div>
<div style="float:left" id="text1005">then expand your application context, there you see "data sources", </div><div ><br/></div><div id="translation1005"></div>
<div style="float:left" id="text1006">on the right pane from drop down choose the create new data source </div><div ><br/></div><div id="translation1006"></div>
<div style="float:left" id="text1007">enter the requested information. </div><div ><br/></div><div id="translation1007"></div>
<div style="float:left" id="text1008">validation query may be SELECT=1; </div><div ><br/></div><div id="translation1008"></div>
<div style="float:left" id="text1009"> </div><div ><br/></div><div id="translation1009"></div>
<div style="float:left" id="text1010">Try this as I am using this and my application running fine. </div><div ><br/></div><div id="translation1010"></div>
</body>
</html>


已有 0 人发表留言,猛击->>这里<<-参与讨论


JavaEye推荐

搜狐网站诚聘Java、PHP和C++工程师北京: 千橡集团暨校内网诚聘软件研发工程师


技能云友情提示您: 如果您对本文观点感兴趣,欢迎到原文出处讨论,谢谢!