CSS不会用了,请问这样设置为什么没有效果?
$("#timeOutInfoTable ").css("border","1");
$("#timeOutInfoTable ").css("cellpadding","0");
$("#timeOutInfoTable ").css("cellspacing","0");
$("#timeOutInfoTable ").attr("border","1"); 用 attr
timeOutInfoTable 这是一个表格,我想给它加上边框,这样做为什么没有什么变化??
<!DOCTYPE html>
<html>
<head>
<script src="http://www.w3school.com.cn/jquery/jquery-1.11.1.min.js">
</script>
<script>
$(document).ready(function(){
$("#timeOutInfoTable ").click(function(){
$("#timeOutInfoTable ").attr("border","1");
$("#timeOutInfoTable ").css("cellpadding","0");
$("#timeOutInfoTable ").css("cellspacing","0");
});
});
</script>
</head>
<body>
<table id="timeOutInfoTable">
<tr><td>如果您点击我</td></tr>
</table>
</body>
</html>