微信游戏Html5+Jquery

核心提示<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>checkbox</title> <script src="js/jq

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>checkbox</title>

<script src="js/jquery-1.3.2.js" type="text/javascript"></script>

<script src="js/1.js" type="text/javascript"></script>

</head>

<body>

<table id="table1">

<tr>

<td><input type="checkbox" value="1"/>1</td>

<td id="k_1"><input type="text" name="student" id="s_1" readonly="true"/></td>

</tr>

<tr>

<td><input type="checkbox" value="2"/>2</td>

<td id="k_2"><input type="text" name="student" id="s_2" readonly="true"/></td>

</tr>

<tr>

<td><input type="checkbox" value="3"/>3</td>

<td id="k_3"><input type="text" name="student" id="s_3" readonly="true"/></td>

</tr>

<tr>

<td><input type="checkbox" value="4"/>4</td>

<td id="k_4"><input type="text" name="student" id="s_4" readonly="true"/></td>

</tr>

</table>

</body>

</html>

-------------------------------------------------------------

$(document).ready(function() {

$("td[id^='k_']").hide();

var check = $(":checkbox"); //得到所有被选中的checkbox

var actor_config; //定义变量

check.each(function(i){

actor_config = $(this);

actor_config.click(

function(){

if($(this).attr("checked")==true){

$("#k_"+$(this).val()).show();

}else{

$("#k_"+$(this).val()).hide();

}

}

);

});

});

楼上说的太复杂,简单的说 html 是网页的后缀名,html5 还是网页游戏,但是在普通的网页做了改进,有了存储,改动,查看的数据库连接,方便玩家注册使用的,不是使用cookie保存数据

 
友情链接
鄂ICP备19019357号-22