Team:Tsinghua/try

From 2010.igem.org

(Difference between revisions)
Line 1: Line 1:
 +
<script>
 +
function Ok_OnClick(event)
 +
{
 +
if(document.getElementsByName("textName")[0].value == ""){
 +
alert("请输入内容");
 +
return;
 +
}//getElementById
 +
var table;
 +
var tableList = document.getElementsByTagName("TABLE");
 +
for(var i = 0 ; i < tableList.length ; i++) {
 +
if(tableList[i].name == "tableName") {
 +
table = tableList[i]
 +
break;
 +
}
 +
}
 +
var value = document.getElementsByName("textName")[0].value;
 +
var index = table.rows.length;
 +
table.insertRow(index);
 +
table.rows(index).insertCell(0);
 +
table.rows(index).cells(0).innerText = value;
 +
document.getElementsByName("textName")[0].value = "";
 +
}
 +
</script> 
 +
 +
<html>
<html>

Revision as of 11:51, 23 July 2010

<script> function Ok_OnClick(event) { if(document.getElementsByName("textName")[0].value == ""){ alert("请输入内容"); return; }//getElementById var table; var tableList = document.getElementsByTagName("TABLE"); for(var i = 0 ; i < tableList.length ; i++) { if(tableList[i].name == "tableName") { table = tableList[i] break; } } var value = document.getElementsByName("textName")[0].value; var index = table.rows.length; table.insertRow(index); table.rows(index).insertCell(0); table.rows(index).cells(0).innerText = value; document.getElementsByName("textName")[0].value = ""; } </script>


Follow us on:




Until the Jamboree: 载入天数...载入秒数...




网页特效观止|JsCode.CN|---在您的网页里加入北京奥运倒计时的代码 距离北京奥运会开幕还有:
小时


Locations of visitors to this page

Locations of visitors to this page

[url=http://www3.clustrmaps.com/user/19fbb75c][img]http://www3.clustrmaps.com/stats/maps-no_clusters/2010.igem.org-Team-Tsinghua-thumb.jpg[/img][/url]







<script> function Ok_OnClick(event) { if(document.getElementsByName("textName")[0].value == ""){ alert("请输入内容"); return; }//getElementById var table; var tableList = document.getElementsByTagName("TABLE"); for(var i = 0 ; i < tableList.length ; i++) { if(tableList[i].name == "tableName") { table = tableList[i] break; } } var value = document.getElementsByName("textName")[0].value; var index = table.rows.length; table.insertRow(index); table.rows(index).insertCell(0); table.rows(index).cells(0).innerText = value; document.getElementsByName("textName")[0].value = ""; } </script>

留言版

留言版
呵呵,一个超简陋的留言版 ^_^