Цитата | Quote(Wak @ 15.03.2008 - 23:15)
Не будет работать вообще!
Так будет:
Code
<script language="JavaScript">
i=1;
if (i==1){
document.write("<table border=1 width=100 height=100>");
document.write("<tr><td height=50 width=50><p align=center>1</td><td height=50 width=50><p align=center>2</td></tr>");
document.write("<tr><td height=50 width=50><p align=center>3</td><td height=50 width=50><p align=center>4</td></tr></table>");
}
else
{
document.write("<table border=1 width=100 height=100>");
document.write("<tr><td height=100 width=100><p align=center>0</td></tr></table>");
}
</script>
i=1;
if (i==1){
document.write("<table border=1 width=100 height=100>");
document.write("<tr><td height=50 width=50><p align=center>1</td><td height=50 width=50><p align=center>2</td></tr>");
document.write("<tr><td height=50 width=50><p align=center>3</td><td height=50 width=50><p align=center>4</td></tr></table>");
}
else
{
document.write("<table border=1 width=100 height=100>");
document.write("<tr><td height=100 width=100><p align=center>0</td></tr></table>");
}
</script>
Или так:
Code
<script language="JavaScript">
i=1;
if (i==1){
document.write("<table border='1' width='100' height='100'>");
document.write("<tr><td height='50' width='50'><p align='center'>1</td><td height='50' width='50'><p align='center'>2</td></tr>");
document.write("<tr><td height='50' width='50'><p align='center'>3</td><td height='50' width='50'><p align='center'>4</td></tr></table>");
}
else
{
document.write("<table border='1' width='100' height='100'>");
document.write("<tr><td height='100' width='100'><p align='center'>0</td></tr></table>");
}
</script>
i=1;
if (i==1){
document.write("<table border='1' width='100' height='100'>");
document.write("<tr><td height='50' width='50'><p align='center'>1</td><td height='50' width='50'><p align='center'>2</td></tr>");
document.write("<tr><td height='50' width='50'><p align='center'>3</td><td height='50' width='50'><p align='center'>4</td></tr></table>");
}
else
{
document.write("<table border='1' width='100' height='100'>");
document.write("<tr><td height='100' width='100'><p align='center'>0</td></tr></table>");
}
</script>
Найди отличия...