下面的代码在内容页面和运行时间中不起作用ctrl + g按不起作用帮助我 [英] below code work not in content page and run time ctrl+g press not work help me

查看:64
本文介绍了下面的代码在内容页面和运行时间中不起作用ctrl + g按不起作用帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

    <script type="text/javascript">
      google.load("elements", 
"1", {
      packages: 
"transliteration"
       
});
      function onLoad() 
{
     var options = 
{
      sourceLanguage:
       google.elements.transliteration.LanguageCode.ENGLISH,
      destinationLanguage:
       google.elements.transliteration.LanguageCode.TAMIL,
      shortcutKey: 
'ctrl+g',
      transliterationEnabled: 
true
     };
     var 
control =
      new 
google.elements.transliteration.TransliterationControl(options);
     control.makeTransliteratable(['TextBox1']);
      
}
      
google.setOnLoadCallback(onLoad);   
    </script>



[edit]已修复代码块-OriginalGriff [/edit]



[edit]Code block fixed - OriginalGriff[/edit]

推荐答案

我不明白这是什么问题?以下代码对我有用..
I don''t understand what is the problem? The following code works for me..
<!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>
    <title></title>
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>

     
    <script type="text/javascript">
        google.load("elements","1", {    packages:"transliteration" });
        function onLoad() {
            var options =
            {
                sourceLanguage:google.elements.transliteration.LanguageCode.ENGLISH,
                destinationLanguage:google.elements.transliteration.LanguageCode.TAMIL,
                shortcutKey:'ctrl+g',
                transliterationEnabled:true };
            var control = new  google.elements.transliteration.TransliterationControl(options);
            control.makeTransliteratable(['TextBox1']);
        }
        google.setOnLoadCallback(onLoad);   
    </script>

</head>
<body>
        <input id="TextBox1" type="text" />
    
</body>
</html>



您能验证一下并让我知道错误中显示的内容吗?



Could you please verify and let me know what is shown in the error?


这篇关于下面的代码在内容页面和运行时间中不起作用ctrl + g按不起作用帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆