javascript - 我如何在 swiper.js 文件中编写阿拉伯语文本?PS:不在html输出文件中,而是在js脚本文件中
问题描述
var loopSteps = [
{ title: 'Locate', details: 'In a hurry just find a Loop near by you.' },
{ title: 'Scan', details: 'Scan the Loop with your mobile or type in your code to activate.' },
{ title: 'Ride', details: 'Fasten your helmet, hop on and start your journey' }
]
在这部分脚本中:我只想将阿拉伯语的详细信息文本显示在网页中。
解决方案
修订:
将编辑器的编码设置为 utf-8。
dir
- 额外的,如果你愿意的话。
原文,撤回:
中<head>
,添加:
<meta charset="UTF-8">
或者,更具体地说:
<meta charset="ISO-8859-6">
应该管用。
也许您想dir="rtl"
在元素中使用,甚至在<body>
标签中使用。整个页面将从右到左,包括表格单元格顺序和滚动条的一侧。
确保使用 utf-8 编码(不是 ansi 等)保存编辑器文件
推荐阅读
- python - Python中的os.makedirs问题没有创建子目录
- reactjs - React-final-form:警告:React 无法识别 DOM 元素上的“initialValues”道具
- python - Pandas_profiling-1.4.1 对有效数据集抛出 ZeroDivisionError ,哪个 pandas 版本稳定?
- c - 未能编译包含问题的 C 代码
- typescript - 为类对象赋值后出现“TypeError:XXXX 不是函数”
- python - Python os.listdir 没有给出一致的输出
- dart - Flutter:扫描 QR 阅读器的自定义 UI。请让我知道任何插件,以便我可以在扫描屏幕底部制作菜单
- sql-server - 将 Oracle SQL 开发人员连接到 Microsoft SQL Server 2017
- angular - 输入值时输入类型号限制范围0到1(十进制值可以加)
- c - C如何访问结构内的链表