惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google Online Security Blog
Google Online Security Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
Cisco Talos Blog
Cisco Talos Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Scott Helme
Scott Helme
Project Zero
Project Zero
E
Exploit-DB.com RSS Feed
S
Secure Thoughts
K
Kaspersky official blog
L
Lohrmann on Cybersecurity
NISL@THU
NISL@THU
WordPress大学
WordPress大学
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LINUX DO - 热门话题
小众软件
小众软件
P
Privacy & Cybersecurity Law Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
About on SuperTechFans
Hacker News: Ask HN
Hacker News: Ask HN
AWS News Blog
AWS News Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hacker News: Front Page
F
Full Disclosure
Latest news
Latest news
Schneier on Security
Schneier on Security
The Hacker News
The Hacker News
T
Troy Hunt's Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Jina AI
Jina AI
Martin Fowler
Martin Fowler
P
Proofpoint News Feed
TaoSecurity Blog
TaoSecurity Blog
G
GRAHAM CLULEY
Forbes - Security
Forbes - Security
V
V2EX - 技术
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Vulnerabilities – Threatpost
C
Cyber Attacks, Cyber Crime and Cyber Security
MongoDB | Blog
MongoDB | Blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
P
Privacy International News Feed
C
Check Point Blog
N
News and Events Feed by Topic

博客园 - IamV

ADO.NET Entity Framework: 由 Entity Object 執行 SQL 指令 Expression<Func<int, bool>>与<Func<int, bool> search something from db [转]python文件操作/打开/删除文件/压缩文件 Flash与3D编程探秘 - 文章目录 silverlight RenderTransform 后台动画设置 2104 Couldn't download the silverlight application Cannot connect to external websites - WebClient - IamV .NET下多线程中设置按钮的文本 - IamV - 博客园 [Desklighter]在桌面上运行你的Silverlight文件 - IamV [转]Silverlight 2.0 正式版跨域提交数据 - IamV Application.DoEvent() - IamV 转:C#线程调用带参数的方法 - IamV [转]深入了解字符集和编码 Office SharePoint Server Search与Windows SharePoint Services Search - IamV 调用WCF返回Josn的两种方式 - IamV asp.net Excel_MyTest - IamV SharePoint-Server Farm Configuration Not Complete - IamV Using JSON with ASP.NET 3.5 - IamV
How to Embed Silverlight Content in HTML
IamV · 2009-02-10 · via 博客园 - IamV

1.http://blogs.msdn.com/tims/archive/2007/07/31/iframe-support-in-silverlight-streaming.aspx

   http://silverlight.net/forums/p/3722/10851.aspx

   This-> http://www.ddj.com/architect/202800424?pgno=2

----------------------------------------------------------------

先来个js文件 用于第二种 embed

using <DIV> tag embed Flash and Silverlight

----------------------------------------------------------------

//IamV_flash
//IamV_silverlight

function IamV_Initialize() {
    var myLayers = document.getElementsByTagName('div');
    if (myLayers.length <= 0)
        return;

    var myDiv = null;
    var sHtml = null;
    for (i = 0; i < myLayers.length; i++) {
        myDiv = myLayers[i];
        if (myDiv.className == 'IamV_flash') {
            sHtml = getFlash(myDiv.id);
            myDiv.innerHTML = sHtml;
            continue;
        }
        if (myDiv.className == 'IamV_silverlight') {
            sHtml = getSilverLight(myDiv.id);
            myDiv.innerHTML = sHtml;
            continue;
        }
    }
}
function getFlash(url) {
    return '<object width="100%" height="100%">'
            //+ '<param name="movie" value="' + url + '"></param>'
            + '<param name="allowFullScreen" value="true"></param>'
            + '<param name="allowscriptaccess" value="always"></param>'
            + '<embed src="' + url + '" type="application/x-shockwave-flash"'
            + 'allowscriptaccess="always" allowfullscreen="true" width="100%" height="100%"></embed></object>';
}
function getSilverLight(url) {
    return '<object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">'
   + '<param name="source" value="' + url + '"/>'
   + '<param name="background" value="white" />'
   + '<param name="minRuntimeVersion" value="2.0.31005.0" />'
   + '<param name="autoUpgrade" value="true" />'
   + '<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>';
}

----------------------------------------------------------------

测试的HTML文件

----------------------------------------------------------------

<html>
<head>
</head>
<body>
 <p>第一种.参见http://www.cnblogs.com/nasa/archive/2008/02/14/1068654.html</p>
 <script type="text/xaml" id="xamlContent">
        <?xml version="1.0"?>
        <Canvas
            xmlns="http://schemas.microsoft.com/client/2007"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
          <Rectangle
            Height="200"
            Width="200"
            Stroke="Black"
            Fill="Wheat"
            StrokeThickness="5"
            RadiusX="10.0"
            RadiusY="10.0"/>
          <TextBlock Canvas.Top="100" Canvas.Left="10">
            No Javascript, wheeeee!!!
          </TextBlock>
        </Canvas>
    </script>

    <div id="controlHost">
        <object
            id="silverlightControl"
            type="application/x-silverlight"
            height="800"
            width="600">
          <param name="Source" value="http://172.28.3.85/IamVSilverlight/ClientBin/IamVImageRotator.xap" />
        </object>
    </div>
  <br />
 <p>第二种.使用上面的JS文件,用于过滤object tag 的情况</p>
 <br />
<script type="text/javascript" src="http://172.28.3.85/SL_inHtml/Silverlight_Helper.js%22%3E%3C/script>

<div id='http://172.28.3.85/IamVSilverlight/ClientBin/IamVImageRotator.xap' class='IamV_silverlight' style="border-style: solid; border-width: 1px; width: 500px; height: 400px;">
 <script type="text/javascript">IamV_Initialize()</script>
 </div>

<input type='button' value='getSL' text='IamV'
 onclick='getElementById("tt").value=getSilverLight("http://172.28.3.85/IamVSilverlight/ClientBin/IamVImageRotator.xap%22);'/>
 <br />
 <textarea id="tt" cols="60" rows="8"></textarea>
 <br />
  <br />
 <p>第三种.简单的</p>
 <br />
<object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="http://172.28.3.85/IamVSilverlight/ClientBin/IamVImageRotator.xap%22/>
<param name="background" value="white" />
<param name="minRuntimeVersion" value="2.0.31005.0" />
<param name="autoUpgrade" value="true" />
<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>
  <br />
 <p>第四种.using embed tag,使用 embed 标签</p>
 <br />
<embed type="application/x-silverlight-2" id="silverlightControl"
  width="500" height="400" background="white"
  source="http://172.28.3.85/IamVSilverlight/ClientBin/IamVImageRotator.xap%22/>
<br />

<br />
<embed allowScriptAccess="never" allowNetworking="internal"
 type="application/x-silverlight-2"
 width="500" height="400" background="white"
 source="http://172.28.3.85/IamVSilverlight/ClientBin/IamVImageRotator.xap%22/>


</body>
</html>