我使用了以下代码:
<DIV style="WIDTH: 100%; HEIGHT: 24px" id="_sizing__c_TarPro">
<DIV style="Z-INDEX: 0; POSITION: relative; BACKGROUND: none transparent scroll repeat 0% 0%; HEIGHT: 24px" id="_slot__c_TarPro">
<object id="sl__c_TarPro" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="xxxxxx.xap&xxxxIgnoreNotFound=true"></param>
<param name="onload" value="onSilverlightLoad" />
<param name="onError" value="onSilverlightError" />
<param name="background" value="transparent" />
<param name="windowless" value="true" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<param name="Culture" value="EN" />
<param name="UICulture" value="EN" />
<param name="initParams" value="xxxxxxxxxxxxxxxxxxxxxxx,
dimension=DIMENSION4,
defaultValue=,
dimensionDescription=,
allowMultipleSelection=TRUE,
allowLeafSelection=TRUE,
allowParentSelection=TRUE,
allowReadAccessSelection=TRUE,
attributeFilter=,
symbolSpec=DIM4SET,
targetVariable=_c_TarPro"/>
width=200,
height=24,
<a href="http://go.microsoft.com/fwlink/?LinkID=149156" style="text-decoration: none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style: none"></img>
</a>
</object>
<input id="_c_TarPro" name="_c_TarPro" style="display:none" value=""/>
</DIV>
</DIV>
对多个对象重复此代码,有时会显示这些对象。但有时很少显示对象,刷新后不显示其他对象。随机显示对象的数量。 这只发生在IE8和IE9上。 (对不起之前我在IE9上说它运行良好,因为质量保证报告,但我在IE9上测试并看到同样的问题。)
有人有想法吗?
谢谢,
答案 0 :(得分:0)
我怀疑这是您的问题的原因,但您应用于<param name="initParams">
的宽度和高度是在标记之外声明的,这可能会阻止这些属性被解释。
你有:
<param name="initParams" value="xxxxxxxxxxxxxxxxxxxxxxx,
dimension=DIMENSION4,
defaultValue=,
dimensionDescription=,
allowMultipleSelection=TRUE,
allowLeafSelection=TRUE,
allowParentSelection=TRUE,
allowReadAccessSelection=TRUE,
attributeFilter=,
symbolSpec=DIM4SET,
targetVariable=_c_TarPro"/>
<!-- what are these guys doing outside the tag? -->
width=200,
height=24,