简体   繁体   English

javascript中的英镑符号

[英]pound sign in javascript

I wanna constrain to input special signs like £ ¬ ¦ in javascript,but they are always displayed in on Page source. 我想限制在javascript中输入特殊符号,例如£¬¦,但它们始终显示在``Page Source''上的 中。 How can i let them display correctly and page can be validated ? 如何让它们正确显示并可以验证页面? my page is using utf-8 我的页面正在使用utf-8

thanks 谢谢

Make sure that: 确保:

  • You really are using UTF-8 for the page 您确实在为页面使用UTF-8
  • You are using UTF-8 for the JS 您正在使用JS的UTF-8
  • Your HTTP headers say you are using UTF-8 您的HTTP标头表示您正在使用UTF-8
  • Any <meta> tags you have which mention an encoding say UTF-8 您拥有的任何<meta>标签都提到了编码,例如UTF-8

If you can't confirm all of those, you can use: "\£" 如果不能全部确认,则可以使用: "\£"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM