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

xdh0817 2013-04-26 05:04:19
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出现两个文本框和一个按钮,点击按钮可以改变文本框的内容。
现在的问题:内容无法改变
我是新手,请各位大神解释一下怎么才能实现?
...全文
111 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
xudahai520 2013-04-27
  • 打赏
  • 举报
回复
没有导入js
xdh0817 2013-04-26
  • 打赏
  • 举报
回复
引用 2 楼 liuchulong 的回复:
你是用。net开发吗?还是纯JS
这个我不清楚。本来有一个很大的页面,要给这个页面增加一个菜单,比如:“配置速率”,算是二次开发吧。然后点击这个菜单就要显示一个配置页面。这个配置页面由一个A.XML 一个A.XSL, 一个A.js组成。
xdh0817 2013-04-26
  • 打赏
  • 举报
回复
引用 1 楼 xdh0817 的回复:
这个我不清楚。本来有一个很大的页面,要给这个页面增加一个菜单,比如:“配置速率”,算是二次开发吧。然后点击这个菜单就要显示一个配置页面。这个配置页面由一个A.XML 一个A.XSL, 一个A.js组成。
xdh0817 2013-04-26
  • 打赏
  • 举报
回复
这个我不清楚。本来有一个很大的页面,要给这个页面增加一个菜单,比如:“配置速率”,算是二次开发吧。然后点击这个菜单就要显示一个配置页面。这个配置页面由一个A.XML 一个A.XSL, 一个A.js组成。
liuchulong 2013-04-26
  • 打赏
  • 举报
回复
你是用。net开发吗?还是纯JS
xdh0817 2013-04-26
  • 打赏
  • 举报
回复

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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