全站文本简繁体转换方案
•技术
0
<div class="lang">
<a class="t" href="javascript:;" class="active">繁</a>
<a class="s" href="javascript:;">简</a>
</div>
<script type="text/javascript" src="chinese.js"></script>
$('.lang a').click(function(){
var lang = $(this).attr('class');
localStorage.setItem("zh_choose", lang);
zh_tran(lang);
});
if(localStorage.getItem("zh_choose") == 's'){
zh_tran('s');
}
if(localStorage.getItem("zh_choose") == 't'){
zh_tran('t');
}
3.下载js文件,放到你需要引用的位置