嗨我正在使用xslt来显示我的webpart上的链接,我在链接旁边添加了加号图片.但我想在它们之间添加一些空格.我添加了,但这不是真的有效.我错过了什么吗?请在下面找到我的代码.
谢谢.
<xsl:choose>
<!-- do _self -->
<xsl:when test="contains(Link,'xxx')">
<a target="_self">
<xsl:attribute name="href">
<xsl:value-of select="URL"/>
</xsl:attribute>
<xsl:value-of select="Title"/>
</a>
</xsl:when>
<!-- use _blank (new browser window) -->
<xsl:otherwise>
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="URL"/>
</xsl:attribute>
<xsl:value-of select="Title"/>
</a>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="Description !=' ' ">
<img class="imageclass" src="/images/plus.gif"></img>
</xsl:when>
</xsl:choose>
Run Code Online (Sandbox Code Playgroud) 我有一个列表,我存储图像URL,我正在尝试读取项目列表并在页面上显示图像.为此我写了下面的脚本......
<script type="text/javascript">
function ViewItem()
{
var myQueryString = '<Query><Where><Eq><FieldRef Name="Anchor" /><Value
Type="Boolean">1</Value></Eq></Where></Query>';
var context = new SP.ClientContext.get_current();
var web = context.get_web();
var list = web.get_lists().getByTitle('AnchorImageList');
var myquery = new SP.CamlQuery();
myquery.set_viewXml(myQueryString);
myItems = list.getItems(myquery);
context.load(myItems, 'Include(Title,ImageURL)');
context.executeQueryAsync(Function.createDelegate(this, this.success),
Function.createDelegate(this, this.failed));
}
function success()
{
var LinkURL= "";
var ImageURL="";
var ListEnumerator = this.myItems.getEnumerator();
while(ListEnumerator.moveNext())
{
var currentItem = ListEnumerator.get_current();
LinkURL = currentItem.get_item('Title') ;
ImageURL= currentItem.get_item('ImageURL');
document.write('<img src="' + ImageURL+ '"+>');
alert(LinkURL);
}
}
function failed(sender, args)
{
alert("failed. Message:" …Run Code Online (Sandbox Code Playgroud)