为什么鼠标移上去背景不变色???(测试过,响应鼠标事件,不过不变色,迷惑....)该怎么做???

itbook 2002-12-23 09:11:16
为什么鼠标移上去背景不变色???(测试过,响应鼠标事件,不过不变色,迷惑....)该怎么做???
<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns="http://www.w3.org/TR/REC-html40"
result-ns="">
<xsl:template>
<xsl:apply-templates/>
</xsl:template>

<xsl:template match = "/">
<HTML>
<HEAD>
<style>
.mouseover {
background-color: #FFFFFF;
}
.mouseout {
background-color: #AAAAAA;
}
</style>
<script>
function mouseover(id)
{
id.className = "mouseover";
}
function mouseout(id)
{
id.className = "mouseout";
}
</script>
</HEAD>
<BODY>
<font id='aaa'>
<xsl:attribute name="onMouseOver">mouseover(this);</xsl:attribute>
<xsl:attribute name="onMouseOut">mouseout(this);</xsl:attribute>
变色</font>
</BODY>
</HTML>
</xsl:template>
...全文
75 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
全息宇宙 2002-12-23
  • 打赏
  • 举报
回复
测试过,不存在问题
<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns="http://www.w3.org/TR/REC-html40"
result-ns="">
<xsl:template>
<xsl:apply-templates/>
</xsl:template>

<xsl:template match = "/">
<HTML>
<HEAD>
<style>
.mouseover {
background-color: #FFFFFF;
}
.mouseout {
background-color: #AAAAAA;
}
</style>
<script>
function mouseover(id)
{
id.className = "mouseover";
}
function mouseout(id)
{
id.className = "mouseout";
}
</script>
</HEAD>
<BODY>
<font id='aaa'>
<xsl:attribute name="onMouseOver">mouseover(this);</xsl:attribute>
<xsl:attribute name="onMouseOut">mouseout(this);</xsl:attribute>
变色</font>
</BODY>
</HTML>
</xsl:template>
Kyle_Chen 2002-12-23
  • 打赏
  • 举报
回复
1. append "</xsl:stylesheet>" at the end
2. create a 1.XML file to use this .XSL file(assume the name is t.xsl):
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="t.xsl"?>
<test />
3. Start 1.xml in IE. You can see it works.
itbook 2002-12-23
  • 打赏
  • 举报
回复
不行啊还???
孟子E章 2002-12-23
  • 打赏
  • 举报
回复
.mouseover换成其他的名字kankan
.mxh
itbook 2002-12-23
  • 打赏
  • 举报
回复
少了一句:</xsl:stylesheet>

8,909

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧