保证各个地方保证同一种编码,假如都是utf-81、html5页面:2、PHP页面:header('content-type:text/html; charset=utf-8');3、数据库:mysql_query('set names utf8');