播放音乐

<%@ page language="java" import="java.util.*"%>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="/WEB-INF/tld/c.tld"%>
<script src="/dwr/interface/orderMessageHelper.js" type=text/javascript></script>
<script src="js2.0/print.js" type="text/javascript"></script>
  <div class="newmsg" style="display:none" id="new_msg">
    <div class="msgpic"><img src="${site.style}images/newmsg3.jpg" /></div>
   <ul>
    <li><span id="msg_content"></span></li>
   </ul>
   <div class="delpic"><a href="javascript:hideOrderMsg();" ><img src="${site.style}images/ico_del01.gif"  /></a></div>
  </div>
<div id="sound_div" style="display:none"></div>
<script type="text/javascript">
 function playMusic(){
   document.getElementById("sound_div").innerHTML=players("${site.orderRemindSound}");     
 }


function players(url){
 var s ="";
 s=s.concat("<object id=\"Exobud\" width=\"470\" height=\"78\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\"  codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715\" ");
 s=s.concat(" align=\"baseline\" border=\"0\" standby=\"Loading Microsoft Windows Media Player components...\" ");
 s=s.concat(" type=\"application/x-oleobject\"> ");
 s=s.concat("<param name=\"ShowControls\" value=\"1\">");
 s=s.concat("<param name=\"ShowPositionControls\" value=\"0\">");
 s=s.concat("<param name=\"ShowAudioControls\" value=\"1\">");
 s=s.concat("<param name=\"ShowTracker\" value=\"1\">");
 s=s.concat("<param name=\"ShowDisplay\" value=\"0\">");
 s=s.concat("<param name=\"ShowStatusBar\" value=\"1\">");
 s=s.concat("<param name=\"AutoSize\" value=\"0\">");
 s=s.concat("<param name=\"ShowGotoBar\" value=\"0\">");
 s=s.concat("<param name=\"ShowCaptioning\" value=\"0\">");
 s=s.concat("<param name=\"AutoStart\" value=\"1\">");
 s=s.concat("<param name=\"PlayCount\" value=\"1\">");
 s=s.concat("<param name=\"AnimationAtStart\" value=\"0\">");
 s=s.concat("<param name=\"TransparentAtStart\" value=\"0\">");
 s=s.concat("<param name=\"AllowScan\" value=\"0\">");
 s=s.concat("<param name=\"EnableContextMenu\" value=\"1\">");
 s=s.concat("<param name=\"ClickToPlay\" value=\"0\">");
 s=s.concat("<param name=\"InvokeURLs\" value=\"1\">");
 s=s.concat("<param name=\"DefaultFrame\" value=\"datawindow\">");
 s=s.concat("<param name=\"filename\" value=\""+url+"\">");
 s=s.concat("<param name=\"volume\" value=\"0\">");
 s=s.concat("<embed align=\"baseline\"  border=\"0\" width=\"350\" height=\"68\"");
 s=s.concat(" type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/isapi/redir.dll?prd=windows&amp;sbp=mediaplayer&amp;ar=media&amp;sba=plugin&amp;\"");
 s=s.concat(" name=\"MediaPlayer\" showcontrols=\"1\" showpositioncontrols=\"0\"");
 s=s.concat(" showaudiocontrols=\"1\" showtracker=\"1\" showdisplay=\"0\" showstatusbar=\"1\"");
 s=s.concat(" autosize=\"0\"");
 s=s.concat(" showgotobar=\"0\" showcaptioning=\"0\" autostart=\"1\" autorewind=\"0\"");
 s=s.concat(" animationatstart=\"0\" transparentatstart=\"0\" allowscan=\"1\"");
 s=s.concat(" enablecontextmenu=\"1\" clicktoplay=\"0\" invokeurls=\"1\"");
 s=s.concat(" defaultframe=\"datawindow\" >");
 s=s.concat(" </embed>");
 s=s.concat("<\/object>");
 
 return s;
 
}

function postProcessMessage(data){

 if(data==null)return;
    <c:if test="${usr.autoProcessOrder}" >
    //alert(data.orderid);
     //printHidden("order.shop.do?op=print&orderid=19710,19711,");
      printHidden("order.shop.do?op=print&orderid="+data.orderid);
     
   </c:if>
 if(data.link!=null){
 

  $("#new_msg").show();
  <c:if test="${!usr.autoProcessOrder}" >
    var loc = document.location.href;
    if(loc.indexOf("order.shop.do?op=list")!=-1||loc.indexOf("promptMessage.do")!=-1){
    
     $("#main_div").html( $.ajax({ url: data.link+"&r="+Math.random(), async: false }).responseText);
     
  
    }
  </c:if>

  
  trCssFun();
  clickTr();
  
 }
 //alert(data.orderid);
  if(data.message!=""){
 // alert(data.messsage);
  $("#msg_content").html(data.message);
  $("#new_msg").show();
 }
 
 renderUser();
 window.focus();
 playMusic();
 
}
 function processOrderMessage(){
  
    orderMessageHelper.getMessage(
     
    
    {
     callback:postProcessMessage,
         
      errorHandler:function(message) {  }
 
    } 
         
         
         );
   
 }

 window.setInterval('processOrderMessage()',"${usr.heartRate}");
 
 
 function hideOrderMsg(){
 
  $("#new_msg").hide();
  
 }
</script>

你可能感兴趣的:(JavaScript,c,DWR,Microsoft,音乐)