毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> net技术 >> 正文

如何用一张图片同时控制动画播放和表单提交按钮

更新时间:2012-8-3:  来源:毕业论文

我想实现用一张图片控制动画播放的同时,还用作表单提交按钮,可是无论如何改,都无法实现,要不只能控制动画,要么只能作为按钮。代码如下,有人能发现问题在哪吗?(现在的状况是:能提交表单,但不能控制动画。图片名:xys_pao.png,动画名:xys.swf)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/qfsy_right.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>qffh_right</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
margin-left: 5px;
margin-top: 2px;
margin-bottom: 0px;
margin-right: 10px;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:6px;
top:48px;
width:673px;
height:251px;
z-index:1;
}
-->
</style>
<style type="text/css">
<!--
#Layer2 {
position:absolute;
left:5px;
top:298px;
width:672px;
height:10px;
z-index:2;
background-color: #3980F4;
}
-->
</style>
<style type="text/css">
<!--
#Layer3 {
position:absolute;
left:6px;
top:308px;
width:330px;
height:256px;
z-index:3;
}
-->
</style>
<style type="text/css">
<!--
#Layer4 {
position:absolute;
left:335px;
top:308px;
width:10px;
height:259px;
z-index:4;
}
-->
</style>
<style type="text/css">
<!--
#Layer5 {
position:absolute;
left:344px;
top:308px;
width:334px;
height:258px;
z-index:5;
}
.xys {
font-size: 18pt;
color: #FF0099;
letter-spacing: 2pt;
text-indent: 4pt;
font-family: "华文行楷";
line-height: 20pt;
text-align: left;
font-weight: normal;
vertical-align: middle;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
top: 0px;
clip: rect(0px,auto,auto,auto);
background-position: top;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
}
-->
</style>
<style type="text/css">
<!--
body {
margin-top: 0px;
}
-->
</style>
<style type="text/css">
<!--
#Layer6 {
position:absolute;
left:46px;
top:284px;
width:633px;
height:233px;
z-index:1;
}
-->
</style>
<style type="text/css">
<!--
#Layer7 {
position:absolute;
left:105px;
top:421px;
width:276px;
height:133px;
z-index:2;
}
-->
</style>
<style type="text/css">
<!--
#Layer8 {
position:absolute;
left:99px;
top:397px;
width:355px;
height:23px;
z-index:3;
}
-->
</style>
<style type="text/css">
<!--
.STYLE3 {
color: #666666;
font-family: "楷体_GB2312";
font-size: 10pt;
}
-->
</style>
<style type="text/css">
<!--
#Layer9 {
position:absolute;
left:452px;
top:544px;
width:25px;
height:26px;
z-index:4;
}
-->
</style>
<style type="text/css">
<!--
#Layer10 {
position:absolute;
left:93px;
top:145px;
width:494px;
height:256px;
z-index:5;
}
-->
</style>
<style type="text/css">
<!--
#Layer11 {
position:absolute;
left:431px;
top:47px;
width:200px;
height:500px;
z-index:5;
}
-->
</style>
<style type="text/css">
<!--
#Layer12 {
position:absolute;
left:409px;
top:563px;
width:60px;
height:68px;
z-index:4;
}
-->
</style>
<style type="text/css">
<!--
#Layer13 {
position:absolute;
left:24px;
top:1119px;
width:36px;
height:32px;
z-index:5;
}
-->
</style>
<style type="text/css">
<!--
#Layer14 {
position:absolute;
left:13px;
top:1107px;
width:50px;
height:32px;
z-index:5;
}
-->
</style>
<style type="text/css">
<!--
#Layer15 {
position:absolute;
left:19px;
top:604px;
width:191px;
height:509px;
z-index:6;
}
-->
</style>
<style type="text/css">
<!--
#Layer16 {
position:absolute;
left:359px;
top:58px;
width:199px;
height:419px;
z-index:4;
}
-->
</style>
<style type="text/css">
<!--
#Layer17 {
position:absolute;
left:393px;
top:569px;
width:78px;
height:64px;
z-index:5;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
  var obj=MM_findObj(objStr);
  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}
//-->
</script>
<style type="text/css">
<!--
#Layer18 {
position:absolute;
left:324px;
top:69px;
width:194px;
height:481px;
z-index:1;
}
-->
</style>
<!-- InstanceEndEditable -->
<link href="../style.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">
<!--
.STYLE1 {font-size: 10pt}
-->
</style>
</head>

<body>
<!-- InstanceBeginEditable name="EditRegion1" -->
<div id="Layer18">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" name="1" width="200" height="500" id="1">
  <param name="movie" value="images/xys.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="transparent" />
  <embed src="images/xys.swf" width="200" height="500" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" name="1" swliveconnect="true"></embed>
  </object>
</div>
<table width="675" height="701" border="0" cellpadding="0" cellspacing="0">
  <tr>
  <td height="280" colspan="2" valign="top"><img src="images/xys_r1_0.jpg" width="675" height="280" /></td>
  </tr>
  <tr>
  <td height="3" colspan="2"><img src="images/spacer.gif" width="1" height="1" /></td>
  </tr>
  <tr>
  <td width="42" height="272" align="right" valign="top">&nbsp;</td>
  <td width="633" height="272" align="right" valign="top" background="images/xys_r1.jpg"><table width="90%" height="268" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
  <td width="2%" height="100">&nbsp;</td>
  <td width="65%">&nbsp;</td>
  <td width="33%">&nbsp;</td>
  </tr>
  <tr>
  <td height="20">&nbsp;</td>
  <td valign="top"><form id="form1" name="form1" method="post" action="">
  <span class="STYLE3">把你的心愿写在下方,抛上许愿树,传达给佛祖:</span>
  </form> </td>
  <td>&nbsp;</td>
  </tr>
  <tr>
  <td height="20">&nbsp;</td>
  <td><textarea name="textarea" cols="40" rows="5" class="xys"></textarea></td>
  <td>&nbsp;</td>
  </tr>
  <tr>
  <td height="20">&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  </tr>
  </table></td>
  </tr>
  <tr>
  <td height="52" colspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td width="69%" height="52">&nbsp;</td>
  <td width="7%"><input type="image" name="imageField" src="images/xys_pao.png" onclick="form1.submit();MM_controlShockwave('0','','Play')" width="48" height="52" ></td>
  <td width="24%">&nbsp;</td>
  </tr>
  </table></td>
  </tr>
  <tr>
  <td height="23" colspan="2">&nbsp;</td>
  </tr>
  <tr>
  <td height="23" colspan="2">&nbsp;</td>
  </tr>
  <tr>
  <td height="23" colspan="2">&nbsp;</td>
  </tr>
  <tr>
  <td height="25" colspan="2">&nbsp;</td>
  </tr>
</table>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
 
<input type="image" name="imageField" src="images/xys_pao.png" onclick="form1.submit();MM_controlShockwave('0','','Play')" width="48" height="52" >
在onclick里面都submit了,后面的controlShockwave已经不会执行了,改用ajax提交吧 
后面的controlShockwave已经不会执行了,改用ajax提交吧
<input type="image" name="imageField" src="images/xys_pao.png" onclick="form1.submit();MM_controlShockwave('0','','Play')" width="48" height="52" >
在onclick里面都submit了,后面的controlShockwave已经不会执行了,改用ajax提交吧 

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。