English 中文(简体)
编制表格 Java
原标题:Creating Tables Using Java Script

采用 Java文字制作一个显示阵列的表格。 我必须使用外部的Javascript文档来建立阵列,并用 lo来制作和填满一张桌子。 我所持有的问题在文字标签内根本没有发生。 我可以撰写“文件:我们的世界!”而没有发生。 在试图制造阵列的通道时,情况并不令人惊讶。 希望得到任何帮助。 这是我第一次以这种方式使用贾瓦特语,而教授所提供的说明没有掌握如何建立表格,即使用排他性。

我的传闻。

var classArray = new Array();
classArray[0] = "CST415 Software Enterprise II";
classArray[1] = "CST420 Foundations for Distruibuted Web Applications in Java"
classArray[2] = "CST433 Database Technology"
classArray[3] = "Ethics and Professional Computing"
classArray[4] = "Introdiction to Graphics Programming"

《刑法》:

<table class="classes">
    <tr>
        <td>
            Classes Taken for Computer Science Major
        </td>
    </tr>
        <script type="text/javascript" src="我的传闻。" >
            for(var i=0; i<5;i++){
                document.write( <tr><td> );
                document.write(classArray[i]);
                document.write( </td></tr> );

            }
        </script>
</table>
最佳回答

(通过<代码>src=vide> 载有其自己的在线代码(细则)。 你们必须分两部分:

<script type="text/javascript" src="myarray.js"></script>
<script type="text/javascript">
   for (...) {
      ....
   }
</script>
问题回答

对于那些来自谷歌并找到其他答案的人来说,不满意。 引言:

var table = document.createElement("table");
var tableBody = document.createElement("tbody");

var row = document.createElement("tr");

for (var i = 0; i < 5; i++) {
    var cell = document.createElement("td");
    var cellText = document.createTextNode("This is cell " + i);
    cell.appendChild(cellText);
    row.appendChild(cell);
}

tableBody.appendChild(row);

table.appendChild(tableBody);

Try it in

不能在外部文字标签内有在线文字。

它们需要成为两个单独的方面。

不是最佳办法,但我用 j子做到这一点。

<script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="myarray.js" >

<script type = "text/javascript">
for (i=0; i<5; i++) {
   $("#TableName").append("<tr><td>" + classArray[i] + "</td></tr>");
   //or if your table doesn t have a name you can find by element or by class
   $(".classes").....
   $("table").....
}
</script>
__author__ =  kunaln 

a=input("enter first value ")

g=(int)(a)*(int)(1)
print (g)

k=(int)(a)*(int)(2)
print (k)

u=(int)(a)*(int)(3)
print (u)

n=(int)(a)*(int)(4)
print (n)

b=(int)(a)*(int)(5)
print (b)

z=(int)(a)*(int)(6)
print (z)

x=(int)(a)*(int)(7)
print (x)

y=(int)(a)*(int)(8)
print (y)

p=(int)(a)*(int)(9)
print (p)

d=(int)(a)*(int)(10)
print (d)




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!