IF문 하나만 가르쳐 주세요 ㅡㅡ; 정보
IF문 하나만 가르쳐 주세요 ㅡㅡ;본문
윈도미디어로 동영상 플레이하기에서
만약 재생버튼을 누르면 동영상이 플레이되고,
그렇지 않으면 그냥 이미지가 나오게 할려고 합니다.
코드는 아래와 같구요.
IF문으로 < 동영상 >부분과 <이미지>부분을 선택적으로 출력이 되게 하고 싶은데
이런경우에 IF문을 어떻게 작성해야 할지 모르겠네요. PHP초보라..
<script language="JavaScript">
<!--
function start(){
document.MediaPlayer1.Play();
}
function pause(){
if (MediaPlayer1.PlayState == 2) document.MediaPlayer1.pause();
}
-->
</script>
<!--
function start(){
document.MediaPlayer1.Play();
}
function pause(){
if (MediaPlayer1.PlayState == 2) document.MediaPlayer1.pause();
}
-->
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5"><img src="<?=$latest_skin_path?>/img/top.gif" width="173" height="7"></td>
</tr>
<tr>
<td><img src="<?=$latest_skin_path?>/img/mid1.gif" width="13" height="109"></td>
<tr>
<td colspan="5"><img src="<?=$latest_skin_path?>/img/top.gif" width="173" height="7"></td>
</tr>
<tr>
<td><img src="<?=$latest_skin_path?>/img/mid1.gif" width="13" height="109"></td>
<!-- 동영상 -->
<td colspan=3 width="146" height="109">
<textarea id=txt_play style="display:none;" rows="0" cols="0">
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="100%" height="100%" id="MediaPlayer1">
<param name="Filename" value="<?=$link_http?>">
<param name="wmode" value="transparent">
<param name="AutoSize" value="1">
<param name="AutoStart" value="false">
<param name="AutoRewind" value="0">
<param name="ClickToPlay" value="false">
<param name="Enabled" value="0">
<param name="EnableContextdir" value="false">
<param name="EnableTracker" value="0">
<param name="Mute" value="0">
<param name="ShowCaptioning" value="0">
<param name="ShowControls" value="0">
<param name="ShowAudioControls" value="false">
<param name="ShowDisplay" value="false">
<param name="ShowTracker" value="false">
<param name="VideoBorderWidth" value="0">
<param name="ShowStatusBar" value="0">
</object></textarea>
<td colspan=3 width="146" height="109">
<textarea id=txt_play style="display:none;" rows="0" cols="0">
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="100%" height="100%" id="MediaPlayer1">
<param name="Filename" value="<?=$link_http?>">
<param name="wmode" value="transparent">
<param name="AutoSize" value="1">
<param name="AutoStart" value="false">
<param name="AutoRewind" value="0">
<param name="ClickToPlay" value="false">
<param name="Enabled" value="0">
<param name="EnableContextdir" value="false">
<param name="EnableTracker" value="0">
<param name="Mute" value="0">
<param name="ShowCaptioning" value="0">
<param name="ShowControls" value="0">
<param name="ShowAudioControls" value="false">
<param name="ShowDisplay" value="false">
<param name="ShowTracker" value="false">
<param name="VideoBorderWidth" value="0">
<param name="ShowStatusBar" value="0">
</object></textarea>
<script language=javascript src=<?=$latest_skin_path?>/embed.js></script></td>
<!-- 동영상 끝 -->
<!-- 이미지 -->
<td colspan="3"><img src="<?=$latest_skin_path?>/img/mid2.gif" width="146" height="109"></td>
<td colspan="3"><img src="<?=$latest_skin_path?>/img/mid2.gif" width="146" height="109"></td>
<!-- 이미지 끝-->
<td><img src="<?=$latest_skin_path?>/img/mid3.gif" width="14" height="109"></td>
</tr>
<tr>
<td><img src="<?=$latest_skin_path?>/img/bottom1.gif" width="13" height="18"></td>
<td><img src="<?=$latest_skin_path?>/img/bottom2more.gif" width="56" height="18"></td>
<td><a href="#" onClick="javascript:start()"><img src="<?=$latest_skin_path?>/img/bottom3play.gif" width="48" height="18"></a></td>
<td><a href="#" onClick="javascript:pause()"><img src="<?=$latest_skin_path?>/img/bottom4stop.gif" width="42" height="18"></a></td>
<td><img src="<?=$latest_skin_path?>/img/bottom5.gif" width="14" height="18"></td>
</tr>
</table>
<? } ?>
</tr>
<tr>
<td><img src="<?=$latest_skin_path?>/img/bottom1.gif" width="13" height="18"></td>
<td><img src="<?=$latest_skin_path?>/img/bottom2more.gif" width="56" height="18"></td>
<td><a href="#" onClick="javascript:start()"><img src="<?=$latest_skin_path?>/img/bottom3play.gif" width="48" height="18"></a></td>
<td><a href="#" onClick="javascript:pause()"><img src="<?=$latest_skin_path?>/img/bottom4stop.gif" width="42" height="18"></a></td>
<td><img src="<?=$latest_skin_path?>/img/bottom5.gif" width="14" height="18"></td>
</tr>
</table>
<? } ?>
댓글 전체