SilverLight调用javascript

                HtmlElement jsScript = HtmlPage.Document.CreateElement("script");
                jsScript.SetAttribute("type", "text/javascript");
                jsScript.SetAttribute("text", "function ReloadPage(){window.open(window.location);}");
                HtmlPage.Document.Body.AppendChild(jsScript);

                ScriptObject so = HtmlPage.Window.GetProperty("ReloadPage") as ScriptObject;
                so.InvokeSelf();

 

你可能感兴趣的:(JavaScript,silverlight)