首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

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

2013-05-02 
急求,xml +xsl +js 更改input文本框内容A.xml?xml version1.0 encodinggb2312 ? ?xml-stylesheet

急求,xml +xsl +js 更改input文本框内容
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出现两个文本框和一个按钮,点击按钮可以改变文本框的内容。
现在的问题:内容无法改变
我是新手,请各位大神解释一下怎么才能实现?

[解决办法]
没有导入js

热点排行