<!-- This is a comment start -->
<script type="text/javascript">
<!--
document.getElementById('table1').rows(1).cells(1).innerHTML="2013-08-08";
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
<!-- This is a comment start -->
<script type="text/javascript">
<!--
function setTd(){
document.getElementById('table1').rows(1).cells(1).innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
<!-- This is a comment start -->
<script type="text/javascript">
<!--
function setTd(){
document.getElementById('table1').rows(1).cells(1).innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
<!-- This is a comment start -->
<script type="text/javascript">
<!--
var setTd = function(){
document.getElementById('table1').rows[1].cells[0].innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
</body>
</html>
参考下
#6
<!DOCTYPE html>
<html>
<head>
<title>this is a test web</title>
</head>
<body>
<!-- This is a comment start -->
<script type="text/javascript">
<!--
var setTd = function(){
document.getElementById('table1').rows[1].cells[0].innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
<!-- This is a comment start -->
<script type="text/javascript">
<!--
function setTd(){
document.getElementById('table1').rows(1).cells(1).innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
<!-- This is a comment start -->
<script type="text/javascript">
<!--
document.getElementById('table1').rows(1).cells(1).innerHTML="2013-08-08";
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
<!-- This is a comment start -->
<script type="text/javascript">
<!--
function setTd(){
document.getElementById('table1').rows(1).cells(1).innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
</body>
</html>
#3
刚刚被领导逼着弄公司里的嵌入式WEB维护,现在在自学javascript,
刚刚不小心按到了ENTER键,问题没说完就发布了,现在我的代码如下
<!DOCTYPE html>
<html>
<head>
<title>this is a test web</title>
</head>
<body>
<!-- This is a comment start -->
<script type="text/javascript">
<!--
document.getElementById('table1').rows(1).cells(1).innerHTML="2013-08-08";
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
<!-- This is a comment start -->
<script type="text/javascript">
<!--
function setTd(){
document.getElementById('table1').rows(1).cells(1).innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
<!-- This is a comment start -->
<script type="text/javascript">
<!--
var setTd = function(){
document.getElementById('table1').rows[1].cells[0].innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
</body>
</html>
参考下
#6
<!DOCTYPE html>
<html>
<head>
<title>this is a test web</title>
</head>
<body>
<!-- This is a comment start -->
<script type="text/javascript">
<!--
var setTd = function(){
document.getElementById('table1').rows[1].cells[0].innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">
<!-- This is a comment start -->
<script type="text/javascript">
<!--
function setTd(){
document.getElementById('table1').rows(1).cells(1).innerHTML="2013-08-08";
}
//-->
</script>
<!-- This is a comment end -->
<input type="button" value="读取" onclick="setTd()">