我做了一个网页。Windows7的IE7不执行Javascript。如何在Windows Phone上启用Javascript?
发布于 2011-08-23 19:12:45
Windows phone7运行的是IE9的移动版本,所以执行javascript应该没有问题。对于这些小信息,我能想到的唯一一件事就是您正在尝试从应用程序中使用webbrowsercontrol。在这种情况下,应将IsScriptEnabled属性设置为true以启用控件内的脚本。
发布于 2011-08-24 16:25:26
希拉克!
在window 7中,您可以启用Javascript。
在xaml中,可以将isScriptEnabled=设置为true。
示例:
<phone:WebBrowser HorizontalAlignment="Left" Width="480" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" ScrollViewer.VerticalScrollBarVisibility="Visible" Name="webBrowser" Height="80" VerticalAlignment="Bottom" IsScriptEnabled="True" ScriptNotify="webBrowser_ScriptNotify" Navigated="webBrowser_Navigated" Navigating="webBrowser_Navigating" />您可以使用event:
private void webBrowser_ScriptNotify(object sender, Microsoft.Phone.Controls.NotifyEventArgs e)
{
//your code : e is returned from the javascript code if javaScript is active
}您可以使用以下命令下载HTML内容: webClient或string htmlcontent = webBrowser.SaveToString
希望这对你有所帮助!Thongaduka
https://stackoverflow.com/questions/7159800
复制相似问题