为JavaScript启用UTF-8编码 [英] Enable UTF-8 encoding for JavaScript
问题描述
我不知道我应该如何标题这个问题,但希望我的朋友们会理解这个问题,并会帮助我:)
我想显示日志消息使用JavaScript的阿拉伯语语言 alert()
函数,为此我编码:
alert('أدخلسعرالافتتحة');
这意味着
alert('输入开盘价');
但是当我保存 .js 文件时Dreamweaver说
如果我运行脚本浏览器说
此页面包含
< meta http-equiv =Content-键入content =text / html; charset = utf-8/>
我在阿拉伯文中使用了很多文本,工作正常。
现在我怎样才能使用不同语言的警报?
没有得到期望的结果,我认为使用一个隐藏的div与阿拉伯消息和jQuery淡入淡出影响解决了这个问题。我写的脚本是:.js 文件
$('#enterOpeningPrice') 。淡入();
$('#enterOpeningPrice')。fadeOut(10000);
.html 文件
< div id =enterOpeningPrice>
< p>无法登录的帐户< / p>
< / div>
感谢所有..
I don't know how should I titled this question but hope my friends will understand the problem and will help me :)
I want to show log message in arabic language using JavaScript alert()
function, for which I code:
alert('أدخل سعر الافتتاح');
which means
alert('Enter opening price');
but when i save the .js file Dreamweaver says
and if I run the script browser says
this page contains
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
and i am using a lot of text in arabic which works fine.
now how can I use alert for different language?
thanks friends, after trying all and not getting desired result i think to use a hidden div with that arabic message and with jQuery fading affects solved the problem. Script I wrote is: .js file
$('#enterOpeningPrice').fadeIn();
$('#enterOpeningPrice').fadeOut(10000);
.html file
<div id="enterOpeningPrice">
<p>أدخل سعر الافتتاح</p>
</div>
Thanks to all..
这篇关于为JavaScript启用UTF-8编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!