如何在XML中使用脚本?

conrad_wan 2002-04-05 10:21:29
请举个例子,如用JScript在XML中弹出一个对话框。
多谢了!
...全文
160 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
conrad_wan 2002-04-05
  • 打赏
  • 举报
回复
出现错误:Microsoft JScript 运行时错误缺少对象 line = 2, col = 2 (line is offset from the start of the script block). Error returned from property or method call.
MAGICSLIAO 2002-04-05
  • 打赏
  • 举报
回复
用在XSL中。
<xsl:script>
alert("这就是了!!!");
</xsl:script>
karma 2002-04-05
  • 打赏
  • 举报
回复
this msxml:script runs inside the transformation, alert() is a member function for window object in DHTML, not a javascript function
MAGICSLIAO 2002-04-05
  • 打赏
  • 举报
回复
用在XSL中。
<xsl:script>
alert("这就是了!!!");
</xsl:script>
conrad_wan 2002-04-05
  • 打赏
  • 举报
回复
我在显示xml的xsl中用到:
<msxsl:script implements-prefix="user">
function xml(nodelist) {
return nodelist.nextNode().xml;
}
</msxsl:script>
然后用<xsl:value-of select="user:xml(.)"/>在解析xml时就可调用这个函数,但换成alert("OK")就不行。

不知道说清楚了没有,请赐教!
karma 2002-04-05
  • 打赏
  • 举报
回复
XML is just plain text, what do you mean by 用JScript在XML中弹出一个对话框??
conrad_wan 2002-04-05
  • 打赏
  • 举报
回复
又试了一下,可以直接在xsl中使用。很简单的问题,谢谢大家!给分。。。

8,907

社区成员

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

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