本站已经实装Google在线拼音输入法

QQ截图20110702011159

安装方法:

头部JS代码

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
   // Load the Google Transliteration API
   google.load("elements", "1", {
       packages: "transliteration"
   });
   function onLoad() {
     var options = {
       sourceLanguage: 'en',
       destinationLanguage: ['zh'], // zh是中文
       shortcutKey: 'ctrl+g',
       transliterationEnabled: true
     };
     // Create an instance on TransliterationControl with the required
     // options.
     var control =
         new google.elements.transliteration.TransliterationControl(options);
     // 输入法作用输入框的ID 如:<textarea name="comment" id="comment"></textarea>
     var ids = ["author", "comment" ];
     control.makeTransliteratable(ids);
     // translControl是图标的ID 如:<div id='translControl'></div>
     control.showControl('translControl');
   }
   google.setOnLoadCallback(onLoad);
</script>