Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法使用由多个值构建的字符串来显示图像?IE。我想显示一个路径包含属性值的图像。我的代码示例(不起作用):
<img src="{'subdirectory/' + @title + '150p.png'}" />
如果当前节点的“title”属性 =“main”,这会尝试显示路径为“subdirectory/main150p.png”的图像,但失败。
看起来您可能正在考虑使用 Javascript 而不是 XPath。尝试<img src="{concat('subdirectory/', @title, '150p.png')}" />
<img src="{concat('subdirectory/', @title, '150p.png')}" />