急求 xml + xsl + js 更改input文本框内容

xdh0817 2013-04-26 04:56:16
A.xml
<?xml version="1.0" encoding="gb2312" ?>
<?xml-stylesheet type = "text/xsl" href = "A.xsl"?>
<bookstore>
<td> hello </td>
</bookstore>

A.xsl

<?xml version = "1.0" encoding = "gb2312"?>
<xsl:stylesheet version = "1.0" xmlns:xsl = "http://www.w3.org/1999/XSL/Transform">
<xsl:template name = "HTML_HEAD">
<script type = "text/javascript" language = "javascript" src = "A.js">
</script>
</xsl:template>
<xsl:template match = "/">
<xsl:param name = "sre_res"/>
<table id = "table1" class = "content_body_area" border = "0" cellpaddng = "0" cellspacing = "0">
<tr class = "row135">
<td class = "content_item" widths = "25%">
</td>


<td class = "content_value">
<input type = "text" class = "textbox" id = "text-aging-time1" style = "width:400" value = "hello">

</input>
</td>
<td class = "content_value">
<input type = "text" class = "textbox" id = "text-aging-time2" style = "width:400" value = "jack">

</input>
</td>

</tr>
</table>

<table width="100%" border = "0" cellpaddng = "0" cellspacing = "0" class = "content_set" >
<tr class = "row246">
<td class = "content_item" widths = "25%">
<span> <xsl:value-of select = "/book/year"/> </span>
</td>
<td colspan = "2" align = "center" class = "content_operation_area">
<input name ="ApplyButton" value = "提交" id = "ApplyButton" type = "submit" class = "buttonX" onclick = "changeText()"/>

</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>


A.JS

function changeText()
{
var m = "5";
document.getElementById("text-aging-time1").value = m;
}


目的很简单:用IE打开A.xml出现两个文本框和一个按钮,点击按钮可以改变文本框的内容。
现在的问题:内容无法改变
我是新手,请各位大神解释一下怎么才能实现?
...全文
74 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
xudahai520 2013-04-27
  • 打赏
  • 举报
回复
没有导入js
xdh0817 2013-04-26
  • 打赏
  • 举报
回复

8,906

社区成员

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

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