Jsp添加背景音乐无效 Html文件添加有效 为什么?
Html文件中代码如下:
<body>
<bgsound src="file:///E|/a.mp3" loop="-1" balance="0" />
</body>
运行有效
但是在Jsp文件中会出错,如何修改?? JSP中如何添加背景音乐???
路径错误,在jsp添加背景音乐时, <bgsound src=" <%= <%=request.getContextPath()%>%>music.mid" loop="-"> 必须要使用绝对路径,否则发布后网页无法播放背景音乐
src="file:///E|/a.mp3" 路径错误,要用你的request.getContextPath()作为src的头,最好音乐像你的jsp一样放在你的工程里面去,否则要配路径比较麻烦的。你把音乐文件当作一个jsp,然后在浏览器里面怎么找到这个jsp,就把浏览器里面的路径当作src的路径就可以。
<%@ page contentType="text/html; charset=gb2312"%>
<html>
<head>
<title>页头 </title>
</head>
<bgsound src=" <%= <%=request.getContextPath()%>%>mr.wav" loop="-">
<center>
<table border="0" width="100%" height="115" cellspacing="0" cellpadding="0">
<tr> <td> <img src="images/index/indexT.jpg"> </td> </tr>
</table>
相关问答:
我的开发的平台是Myeclipes6.0 + tomcat5.x + mysql
我所有的编码方式都是用的UTF-8
我只用了Strtus框架
在一个form中如下用的是post的提交方式:
<form class="form" action=&quo ......
我是用STRUTS ,做了一个JSP页面,提交后没有存入数据库。
JSP代码如下:
aa.jsp代码
<%@ page contentType="text/html;charset=gb2312" language="java"%>
<%@ taglib uri=" ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
form表单下拉框的蓝色怎么去掉呢,我想把下拉框的颜色设为透明的
may be no way.
像QQ空间里的那些透明的下拉框是怎么弄得呢?
引用
像QQ空间里的那些透明的下拉框是怎么弄得呢?
用层模拟的吧
基本都 ......
如何对xml内容数据进行比较
例如:
<?xml version='1.0' encoding='utf-8'?>
<TestLIST>
<PID>40</PID>
<TestName>深圳市</TestName>
......