jquery表单验证器未正确显示阿拉伯字母 [英] jquery form validator not showing Arabic letters correctly

查看:123
本文介绍了jquery表单验证器未正确显示阿拉伯字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即时尝试使用jquery表单验证,我希望验证文本为阿拉伯语。



问题是当我更改该短语时。 js文件,它显示正方形而不是阿拉伯字母。



这是我的js文件:''



 $( document )。ready( function (){
// 此处放置所有必填字段的ID。
required = [ name email country message,];
// 如果使用#email或#error以外的ID,则在此处替换
email = $( #mail);
errornotice = $( #error);
// 字段显示错误时显示的字段
emptyerror = 请填写此字段。;
emailerror = 请输入有效的电子邮件。;





所以我想把最后两行请填写......和请输入......改为阿拉伯语。

和我已经尝试添加这个代码:charset = UTF-8到头,它仍然没有工作



任何想法如何解决??? div class =h2_lin>解决方案

document )。ready( function (){
// 此处放置所有必填字段的ID。
required = [ name < span class =code-string> email, country message,];
// 如果使用#email或#error以外的ID,请在此处替换
email =


#mail);
errornotice =


#error );
// 字段显示错误时显示的字段
emptyerror = 请填写此字段。;
emailerror = 请输入有效的电子邮件。;





所以我想把最后两行请填写......和请输入......改为阿拉伯语。

和我已经尝试添加此代码:charset = UTF-8到头部,它仍然无法工作



任何想法如何修复??


im trying to use a jquery form validation, and i want the validating text to be arabic.

the problem is that when i change that phrase in the .js file, it shows squares instead of arabic letters.

this is my js file:''

$(document).ready(function(){
// Place ID's of all required fields here.
required = ["name", "email", "country", "message",];
// If using an ID other than #email or #error then replace it here
email = $("#email");
errornotice = $("#error");
// The text to show up within a field when it is incorrect
emptyerror = "Please fill out this field.";
emailerror = "Please enter a valid e-mail.";



so i want to change the last two lines "please fill..." and "please enter..." to arabic.
and i already tried adding this code: charset=UTF-8 to the head, it still didnt work

any ideas how to fix that??

解决方案

(document).ready(function(){ // Place ID's of all required fields here. required = ["name", "email", "country", "message",]; // If using an ID other than #email or #error then replace it here email =


("#email"); errornotice =


("#error"); // The text to show up within a field when it is incorrect emptyerror = "Please fill out this field."; emailerror = "Please enter a valid e-mail.";



so i want to change the last two lines "please fill..." and "please enter..." to arabic.
and i already tried adding this code: charset=UTF-8 to the head, it still didnt work

any ideas how to fix that??


这篇关于jquery表单验证器未正确显示阿拉伯字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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