关于XML、XSLT、JS问题 - .NET技术 / C#
逻辑:在XSL中获得XML中节点picPath的值 例如:/templets/images/test.jpg|/templets/images/ad_1.gif|/templets/images/ad_2.jpg| 声明变量 <xsl:variable name="picPath" select="picPath"/> 将值传给JS函数 <div onload="CutPic($picPath)"> JS函数为 funtion CutPic(picPath) { } 问题:无法将picPath的值传给JS函数CutPic()中 请大虾们帮帮忙,在线等!
来帮顶 干吗发这么多凹凸不平 <div onload="CutPic($picPath)">这有问题 =》<div onload="CutPic(<xsl:valueof name='$picPath'/>)"> 具体看一下帮助,有段时间不用xsl,如果还不行,就如下 <div onload="CutPic(‘<xsl:valueof name='$picPath'/>’)">引用 干吗发这么多凹凸不平 <div onload="CutPic($picPath)">这有问题 =》<div onload="CutPic(<xsl:valueof name='$picPath'/>)"> 具体看一下帮助,有段时间不用xsl,如果还不行,就如下 <div onload="CutPic(‘<xsl:valueof name='$picPath'/>’)"> 上面$picPath形式是变量名,不是原来的节点picPath 如果像你这种方法,应该是<div onload="CutPic(‘<xsl:valueof name='picPath'/>’)"> 但在XSL中会提示少‘>’,所以才声明变量 {{
相关问答:
txt 和XML 格式相应 不借助DataSet 导入读取TXT文件 然后直接写入XML(同一文件,不同数据,递增原数据没有被覆盖情况下增加数据.) 教个要点或最好是有个代码提示的 过路好汉 帮个忙撒^^ 不会,帮楼主 ......
<?xml version="1.0"?> <root> <status>433</status> <msg>这个是汉字</msg> <serialno>123</serialno> </root> 如何用ASP读取 status值 ......
其实这个问题可以找老师回答,这不放假了吗,问问各位高手。 绝对有 ,ASP、net里有好多的逻辑判断等都需要winform基础 C#语言 Ado.net C/S结构 Asp.net B/S结构 俩都是微软出的,都能用C#进行开发 ......
Private Sub Command1_Click() Dim MyString() As String Open "a.xml" For Binary As #1 ' 打开刚创建的文件。 ReDim MyString(LOF(1) - 1) Put #1, , MyRecord ' 读入所有字符到变量中 ......