js实现中英文切换
1.html
<!DOCTYPE html>
<head>
<title>中英文切换</title>
<meta charset="UTF-8" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/language.js"></script>
</head>
<body>
<button id="change">中英文切换</button>
<div style="text-align: center">
你好
</div>
</body>
<script type="text/javascript">
$("#change").click(function() {
translate();
})
</script>
</html>
2.language.js
$(function(){
// do something
var script=document.createElement("script");
script.type=&