比如
Dim web As System.Windows.Forms.WebBrowser = e.Form.controls("webbrowser1").basecontrolweb.ScriptErrorsSuppressed = True '禁止弹出脚本错误对话框