如何在ASP.NET VisualBasic2010中快速打开显示教学文本的浏览器

时间:2012-06-30 10:45:06

标签: asp.net visual-studio-2010

如何只使用其中的一些帮助文本轻松打开新浏览器?

我想创建一个将帮助文本作为参数的函数,它所做的就是打开一个显示帮助文本的新浏览器。

然后,我可以在需要帮助的地方将链接按钮放在我的网络应用程序上,这样用户就可以弹出这些浏览器并提供帮助说明以供参考。

1 个答案:

答案 0 :(得分:0)

请注意,您应该在客户端进行,而不是在服务器端进行。它将像javascript函数一样打开一个新的浏览器窗口,如下所示:

openHelp('Hello from JavaScript!');
function openHelp(content) {
 top.helpWindow=window.open('','myconsole',
  'width=350,height=250'
   +',menubar=0'
   +',toolbar=1'
   +',status=0'
   +',scrollbars=1'
   +',resizable=1')
 top.helpWindow.document.writeln(
  '<html><head><title>Console</title></head>'
   +'<body bgcolor=white onLoad="self.focus()">'
   +content
   +'</body></html>'
 )
 top.helpWindow.document.close()
}