[HTML] ·¹ÀÌ¾î º¸À̱â, °¨Ãß±â
ÆäÀÌÁö 1 Áß 1
[HTML] ·¹ÀÌ¾î º¸À̱â, °¨Ãß±â
°¢°¢ÀÇ ·¹À̾ DB ÀڷḦ Àоîµé¿© ¼±ÅÃÇÑ ·¹À̾ º¸ÀÌ°í, ³ª¸ÓÁö´Â °¨Ãß´Â HTML/ÀÚ¹Ù½ºÅ©¸³Æ® ±¸¹®.
¿¹¸¦µé¾î 4°³ÀÇ ·¹À̾îÁß¿¡¼ 1¹ø° ·¹À̾ ¼±ÅÃÇÏ¸é ³ª¸ÓÁö 3°³ÀÇ ·¹À̾î´Â °¨Ãß´Â ¹æ¹ýÀÔ´Ï´Ù.
document.getElementById(¡¯·¹À̾î_ID¡¯).style.display = ¡®none¡¯ -> ·¹À̾î_ID¡¯¸¦ °¨Ãß±â
document.getElementById(¡¯·¹À̾î_ID¡¯).style.display = ¡®block¡¯ -> ·¹À̾î_ID¡¯¸¦ º¸À̱â
** Æû Å×±× Á¤ÀÇ
<form name=form1 action=<?=$PHP_SELF?> method=post>
<input type=¡±radio¡± name=¡±type¡± value=¡±1¡È checked OnClick=¡±document.getElementById(¡¯Layer1¡Ç).style.display = ¡®block¡¯;document.getElementById(¡¯Layer2¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer3¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer4¡Ç).style.display = ¡®none¡¯¡±>·¹À̾î1
<input type=¡±radio¡± name=¡±type¡± value=¡±2¡È OnClick=¡±document.getElementById(¡¯Layer1¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer2¡Ç).style.display = ¡®block¡¯;document.getElementById(¡¯Layer3¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer4¡Ç).style.display = ¡®none¡¯¡±>·¹À̾î2
<input type=¡±radio¡± name=¡±type¡± value=¡±3¡È OnClick=¡±document.getElementById(¡¯Layer1¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer2¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer3¡Ç).style.display = ¡®block¡¯;document.getElementById(¡¯Layer4¡Ç).style.display = ¡®none¡¯¡±>·¹À̾î3
<input type=¡±radio¡± name=¡±type¡± value=¡±4¡È OnClick=¡±document.getElementById(¡¯Layer1¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer2¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer3¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer4¡Ç).style.display = ¡®block¡¯¡±>·¹À̾î4
</form>
** ·¹À̾î Á¤ÀÇ Ç׸ñ
<div id=Layer1 style=display:block;position:absolute;>
<table>
<tr><td>¹øÈ£</td><td align=center>Å×À̺í1</td></tr>
<?
$query = ¡°select * from table1¡È;
$result = mysql_query($query,$link);
while($info = mysql_fetch_row($result)){
echo ¡°<tr><td>¡±.$info[0].¡±</td><td>¡±.$info[1].¡±</td></tr>¡±;
}
?>
</table>
</div>
<div id=Layer2 style=display:block;position:absolute;>
<table>
<tr><td>¹øÈ£</td><td align=center>Å×À̺í2</td></tr>
<?
$query = ¡°select * from table2¡È;
$result = mysql_query($query,$link);
while($info = mysql_fetch_row($result)){
echo ¡°<tr><td>¡±.$info[0].¡±</td><td>¡±.$info[1].¡±</td></tr>¡±;
}
?>
</table>
</div>
<div id=Layer3 style=display:block;position:absolute;>
<table>
<tr><td>¹øÈ£</td><td align=center>Å×À̺í3</td></tr>
<?
$query = ¡°select * from table3¡È;
$result = mysql_query($query,$link);
while($info = mysql_fetch_row($result)){
echo ¡°<tr><td>¡±.$info[0].¡±</td><td>¡±.$info[1].¡±</td></tr>¡±;
}
?>
</table>
</div>
<div id=Layer4 style=display:block;position:absolute;>
<table>
<tr><td>¹øÈ£</td><td align=center>Å×À̺í4</td></tr>
<?
$query = ¡°select * from table4¡È;
$result = mysql_query($query,$link);
while($info = mysql_fetch_row($result)){
echo ¡°<tr><td>¡±.$info[0].¡±</td><td>¡±.$info[1].¡±</td></tr>¡±;
}
?>
</table>
</div>
¿¹¸¦µé¾î 4°³ÀÇ ·¹À̾îÁß¿¡¼ 1¹ø° ·¹À̾ ¼±ÅÃÇÏ¸é ³ª¸ÓÁö 3°³ÀÇ ·¹À̾î´Â °¨Ãß´Â ¹æ¹ýÀÔ´Ï´Ù.
document.getElementById(¡¯·¹À̾î_ID¡¯).style.display = ¡®none¡¯ -> ·¹À̾î_ID¡¯¸¦ °¨Ãß±â
document.getElementById(¡¯·¹À̾î_ID¡¯).style.display = ¡®block¡¯ -> ·¹À̾î_ID¡¯¸¦ º¸À̱â
** Æû Å×±× Á¤ÀÇ
<form name=form1 action=<?=$PHP_SELF?> method=post>
<input type=¡±radio¡± name=¡±type¡± value=¡±1¡È checked OnClick=¡±document.getElementById(¡¯Layer1¡Ç).style.display = ¡®block¡¯;document.getElementById(¡¯Layer2¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer3¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer4¡Ç).style.display = ¡®none¡¯¡±>·¹À̾î1
<input type=¡±radio¡± name=¡±type¡± value=¡±2¡È OnClick=¡±document.getElementById(¡¯Layer1¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer2¡Ç).style.display = ¡®block¡¯;document.getElementById(¡¯Layer3¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer4¡Ç).style.display = ¡®none¡¯¡±>·¹À̾î2
<input type=¡±radio¡± name=¡±type¡± value=¡±3¡È OnClick=¡±document.getElementById(¡¯Layer1¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer2¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer3¡Ç).style.display = ¡®block¡¯;document.getElementById(¡¯Layer4¡Ç).style.display = ¡®none¡¯¡±>·¹À̾î3
<input type=¡±radio¡± name=¡±type¡± value=¡±4¡È OnClick=¡±document.getElementById(¡¯Layer1¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer2¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer3¡Ç).style.display = ¡®none¡¯;document.getElementById(¡¯Layer4¡Ç).style.display = ¡®block¡¯¡±>·¹À̾î4
</form>
** ·¹À̾î Á¤ÀÇ Ç׸ñ
<div id=Layer1 style=display:block;position:absolute;>
<table>
<tr><td>¹øÈ£</td><td align=center>Å×À̺í1</td></tr>
<?
$query = ¡°select * from table1¡È;
$result = mysql_query($query,$link);
while($info = mysql_fetch_row($result)){
echo ¡°<tr><td>¡±.$info[0].¡±</td><td>¡±.$info[1].¡±</td></tr>¡±;
}
?>
</table>
</div>
<div id=Layer2 style=display:block;position:absolute;>
<table>
<tr><td>¹øÈ£</td><td align=center>Å×À̺í2</td></tr>
<?
$query = ¡°select * from table2¡È;
$result = mysql_query($query,$link);
while($info = mysql_fetch_row($result)){
echo ¡°<tr><td>¡±.$info[0].¡±</td><td>¡±.$info[1].¡±</td></tr>¡±;
}
?>
</table>
</div>
<div id=Layer3 style=display:block;position:absolute;>
<table>
<tr><td>¹øÈ£</td><td align=center>Å×À̺í3</td></tr>
<?
$query = ¡°select * from table3¡È;
$result = mysql_query($query,$link);
while($info = mysql_fetch_row($result)){
echo ¡°<tr><td>¡±.$info[0].¡±</td><td>¡±.$info[1].¡±</td></tr>¡±;
}
?>
</table>
</div>
<div id=Layer4 style=display:block;position:absolute;>
<table>
<tr><td>¹øÈ£</td><td align=center>Å×À̺í4</td></tr>
<?
$query = ¡°select * from table4¡È;
$result = mysql_query($query,$link);
while($info = mysql_fetch_row($result)){
echo ¡°<tr><td>¡±.$info[0].¡±</td><td>¡±.$info[1].¡±</td></tr>¡±;
}
?>
</table>
</div>
Admin- Admin
- °Ô½Ã¹° °¹¼ö : 380
Age : 54
Registration date : 2008-08-09
Character sheet
test: