Javascript确认弹出窗口,我想显示是,否按钮而不是确定和取消.
我使用过这个vbscript代码:
<script language="javascript">
function window.confirm(str) {
execScript('n = msgbox("' + str + '","4132")', "vbscript");
return (n == 6);
}
</script>
Run Code Online (Sandbox Code Playgroud)
这只适用于IE,在FF和Chrome中,它不起作用.
有什么工作要在Javascript中实现这一点吗?
我也想改变像IE浏览器'Windows Internet Explorer'中弹出的标题,我想在这里显示我自己的应用程序名称.
在我使用的Click功能中
NavigationService.Navigate(new Uri("/MainPage.xaml?day=" + this.week.SelectedIndex, UriKind.Relative));
Run Code Online (Sandbox Code Playgroud)
导航到MainPage.xaml,其值指示Panorama.DefaultItem,在MainPage.xaml.cs中,我写的像
if (this.NavigationContext.QueryString.ContainsKey("day"))
{
schedule.DefaultItem = NavigationContext.QueryString["day"];
}
Run Code Online (Sandbox Code Playgroud)
但是出现了NullReferenceException
this.NavigationContext.QueryString.ContainsKey("day")
Run Code Online (Sandbox Code Playgroud)
我不知道错在哪里,如果有人可以帮我解决这个问题,我将不胜感激......