阿拉伯文文本框 [英] Arabic text box

查看:137
本文介绍了阿拉伯文文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个网站:某些字段中输入的英文,而其他在阿拉伯语中输入

I have developed a web site: Some fields are entered in English while others are entered in Arabic language.

现在我想简化用户的输入操作,并希望阿拉伯文本框作为一个DLL。

Now i wanna simplify the input operation for the user and want Arabic textbox as a DLL.

我有一个,但它仅适用于IE浏览器 - 不能与火狐或谷歌浏览器。

I have one but it works only with IE - not with firefox or google chrome ..

感谢这么多..

如何执行在阿拉伯语写的用户?我的意思是每一个直接试图改变语言......当时间将光标移动无(ALT + SHIFT)键。如果有什么办法,财产,DLL或什么都做......

How to enforce the user to write in Arabic? I mean moving the cursor directly without (ALT + SHIFT) keys every time when trying to change the language... If there is any way, property , DLL or what ever to do that...

推荐答案

您可以使用此成熟的JavaScript库工作正常在Firefox和IE浏览器,就像LANG ='FA'或LANG ='恩'的属性添加到您的文本框,就大功告成了,当然你可以根据它为您的使用。

You could use this mature javascript library that works fine on firefox and IE, just add an attribute like lang='fa' or lang ='en' to your textbox and you're done, sure you can tailor it for your usage.

这是在波斯,你可以把它翻译与谷歌阅读的页面。

it's in persian and you can translate it with google to read the page.

我做的客户端code中的添加属性,是这样的。

I've done the adding attribute in client code and it's like this

 <script type="text/javascript">
                $().ready(function () {
                    $("input,textarea").each(function () {
                        $(this).attr("lang", "fa");
                    });
                });
  </script>

这篇关于阿拉伯文文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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