NVH’s Blog

January 8, 2007

Truyền dữ liệu Unicode qua javascript

Filed under: hoc tap

Truyền dữ liệu Unicode qua javascript
Bài tóan: truyền dữ liệu unicode từ form qua javascript về phía server sao cho dữ liệu vẫn giữ được tính đúng đắn (viết TV hay TN thì đều hiển thị tốt)

2 điều cần nhớ:
+ charset của trang html hiển thị form
+ dùng function javascript hỗ trợ là encodeURI để format dữ liệu trước khi truyền qua javascript

Exception:
+ Đối với Firefox, việc dùng encodeURI để format dữ liệu hay không không quan trọng vì nó luôn hiển thị đúng dữ liệu nhập vào (được support??)

Môi trường thử nghiệm:

+ Maxthon 1.5.6 (IE core)
+ FF 1.0.7
+ Dùng charset utf-8

Comments »

The URI to TrackBack this entry is: http://hungnv.blogsome.com/2007/01/08/p93/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>























Get free blog up and running in minutes with Blogsome
Theme designed by Hadley Wickham