对于一个带有警告的简单表单,询问字段是否填写正确,我需要一个执行此操作的函数:
单击按钮时显示警告框,有两个选项:
我认为JavaScript确认可行,但我似乎无法弄清楚如何.
我现在的代码是:
function show_alert() {
alert("xxxxxx");
}
Run Code Online (Sandbox Code Playgroud) 与此问题类似的问题: XPath: select a node based on another node?
目标是根据同级节点的值选择一个节点——在本例中是基于 Pagetype 节点的值的 Pagetitle 节点。
路径:
/dsQueryResponse/Rows/Row/@Title
/dsQueryResponse/Rows/Row/@Pagetype
/dsQueryResponse/Rows/Row/@Pagetitle
Run Code Online (Sandbox Code Playgroud)
这个 xsl 没有返回任何东西:
<xsl:value-of select= "/dsQueryResponse/Rows/Row[Pagetype='Parent']/@Pagetitle" />
Run Code Online (Sandbox Code Playgroud)
示例 xml:
<dsQueryResponse>
<Rows>
<Row>
<Title>1</Title>
<Pagetype>Parent</Pagetype>
<Pagetitle>title of page</Pagetitle>
</Row>
</Rows>
</dsQueryResponse>
Run Code Online (Sandbox Code Playgroud)
目标是返回 Pagetitle 的值,如果它们的 Pagetype 值为“Parent”。
confirm ×1
forms ×1
html ×1
javascript ×1
predicates ×1
sharepoint ×1
submit ×1
xml ×1
xpath ×1
xslt ×1