// JavaScript Document

google.load("language", "1");
    function translate(){
        var source=document.getElementById("trancon").innerHTML
        var translated = document.getElementById("resulttrans");
		  translated.innerHTML = "正在翻译中. . . "
       var fromlang = document.getElementById('sourcelang').value;
       // var tolang = document.getElementById('to').value;
        
        google.language.translate(source, fromlang, "zh-CN", function(result) {
            if (!result.error) {
              translated.style.cssText="color:green"
			  translated.innerHTML = "翻译内容为："+result.translation;
            }
        });
    }
