embedding silverlight, anything like flash?

房东的猫 提交于 2019-12-24 07:16:33

问题


So if I have a flash object, like a youtube video, I can embed that on a website pretty easily (I think because that's flash, not necassarily youtube, maybe I'm wrong?).

I'd like to be be able to drop a silverlight object/embed tag (no javascript) on a static html page (like my blog, which is not the site with the xap file), and be done with it.

Basically it seems like there is zero way to do this unless you can add custom javascript to your site. I've found this link: http://msdn.microsoft.com/en-us/library/cc189089(VS.95).aspx.

Just really confused about this.


回答1:


You can do it with just an object tag. The JavaScript used in the MSDN example is to print any errors that occur while loading the application (though they usually just end up as warning in the browser's status bar).

The minimum snippet I would recommend might look like:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
    width="200px" height="200px">
    <param name="source" value="URL/To/SilverlightApp.xap" />
    <param name="minRuntimeVersion" value="2.0.31005.0" />
    <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
        <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight"
            style="border-style: none" />
    </a>
</object>


来源:https://stackoverflow.com/questions/816159/embedding-silverlight-anything-like-flash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!