仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 597|回复: 8
打印 上一主题 下一主题

[学习教程] ASP网页编程之MSGBOX前往值

[复制链接]
小魔女 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-16 23:22:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
专业性的服务。有的ASP商提供垂直型的应用服务,针对某一特定行业提供应用服务。MsgBoxFunction
Displaysamessageinadialogbox,waitsfortheusertoclickabutton,andreturnsavalueindicatingwhichbuttontheuserclicked.

MsgBox(prompt[,buttons][,title][,helpfile,context])

Arguments
prompt

Stringexpressiondisplayedasthemessageinthedialogbox.Themaximumlengthofpromptisapproximately1024characters,dependingonthewidthofthecharactersused.Ifpromptconsistsofmorethanoneline,youcanseparatethelinesusingacarriagereturncharacter(Chr(13)),alinefeedcharacter(Chr(10)),orcarriagereturnClinefeedcharactercombination(Chr(13)&Chr(10))betweeneachline.

buttons

Numericexpressionthatisthesumofvaluesspecifyingthenumberandtypeofbuttonstodisplay,theiconstyletouse,theidentityofthedefaultbutton,andthemodalityofthemessagebox.SeeSettingssectionforvalues.Ifomitted,thedefaultvalueforbuttonsis0.

title

Stringexpressiondisplayedinthetitlebarofthedialogbox.Ifyouomittitle,theapplicationnameisplacedinthetitlebar.

helpfile

StringexpressionthatidentifiestheHelpfiletousetoprovidecontext-sensitiveHelpforthedialogbox.Ifhelpfileisprovided,contextmustalsobeprovided.Notavailableon16-bitplatforms.

context

NumericexpressionthatidentifiestheHelpcontextnumberassignedbytheHelpauthortotheappropriateHelptopic.Ifcontextisprovided,helpfilemustalsobeprovided.Notavailableon16-bitplatforms.

Settings
Thebuttonsargumentsettingsare:

ConstantValueDescription
vbOKOnly0DisplayOKbuttononly.
vbOKCancel1DisplayOKandCancelbuttons.
vbAbortRetryIgnore2DisplayAbort,Retry,andIgnorebuttons.
vbYesNoCancel3DisplayYes,No,andCancelbuttons.
vbYesNo4DisplayYesandNobuttons.
vbRetryCancel5DisplayRetryandCancelbuttons.
vbCritical16DisplayCriticalMessageicon.
vbQuestion32DisplayWarningQueryicon.
vbExclamation48DisplayWarningMessageicon.
vbInformation64DisplayInformationMessageicon.
vbDefaultButton10Firstbuttonisdefault.
vbDefaultButton2256Secondbuttonisdefault.
vbDefaultButton3512Thirdbuttonisdefault.
vbDefaultButton4768Fourthbuttonisdefault.
vbApplicationModal0Applicationmodal;theusermustrespondtothemessageboxbeforecontinuingworkinthecurrentapplication.
vbSystemModal4096Systemmodal;allapplicationsaresuspendeduntiltheuserrespondstothemessagebox.


Thefirstgroupofvalues(0C5)describesthenumberandtypeofbuttonsdisplayedinthedialogbox;thesecondgroup(16,32,48,64)describestheiconstyle;thethirdgroup(0,256,512,768)determineswhichbuttonisthedefault;andthefourthgroup(0,4096)determinesthemodalityofthemessagebox.Whenaddingnumberstocreateafinalvaluefortheargumentbuttons,useonlyonenumberfromeachgroup.

ReturnValues
TheMsgBoxfunctionhasthefollowingreturnvalues:

ConstantValueButton
vbOK1OK
vbCancel2Cancel
vbAbort3Abort
vbRetry4Retry
vbIgnore5Ignore
vbYes6Yes
vbNo7No


Remarks
Whenbothhelpfileandcontextareprovided,theusercanpressF1toviewtheHelptopiccorrespondingtothecontext.

IfthedialogboxdisplaysaCancelbutton,pressingtheESCkeyhasthesameeffectasclickingCancel.IfthedialogboxcontainsaHelpbutton,context-sensitiveHelpisprovidedforthedialogbox.However,novalueisreturneduntiloneoftheotherbuttonsisclicked.

WhentheMsgBoxfunctionisusedwithMicrosoftInternetExplorer,thetitleofanydialogpresentedalwayscontains"VBScript:"todifferentiateitfromstandardsystemdialogs.

ThefollowingexampleusestheMsgBoxfunctiontodisplayamessageboxandreturnavaluedescribingwhichbuttonwasclicked:

DimMyVar
MyVar=MsgBox("HelloWorld!",65,"MsgBoxExample")
MyVarcontainseither1or2,dependingonwhichbuttonisclicked.
Requirements

</p>ASP是依赖组件的,能访问数据库的组件好多就有好多种,再有就是你微软的工具可是什么都要收钱的啊!
谁可相欹 该用户已被删除
沙发
发表于 2015-1-20 09:44:56 | 只看该作者
Application:这个存储服务端的数据,如果不清除,会直到web应用程序结束才清除(例如重启站点)
变相怪杰 该用户已被删除
板凳
发表于 2015-1-29 06:34:10 | 只看该作者
你可以通过继承已有的对象最大限度保护你以前的投资。并且C#和C++、Java一样提供了完善的调试/纠错体系。
蒙在股里 该用户已被删除
地板
发表于 2015-2-5 23:15:40 | 只看该作者
ASP主要是用好六个对象,其实最主要的是用好其中两个:response和request,就可以随心所欲地控制网页变换和响应用户动作了。
因胸联盟 该用户已被删除
5#
发表于 2015-2-14 04:33:45 | 只看该作者
先学习用frontpage熟悉html编辑然后学习asp和vbscript建议买书进行系统学习
爱飞 该用户已被删除
6#
发表于 2015-3-4 04:34:28 | 只看该作者
ASP(ActiveServerPages)是Microsfot公司1996年11月推出的WEB应用程序开发技术,它既不是一种程序语言,也不是一种开发工具,而是一种技术框架,不须使用微软的产品就能编写它的代码,能产生和执行动态、交互式、高效率的站占服务器的应用程序。
不帅 该用户已被删除
7#
发表于 2015-3-4 04:34:28 | 只看该作者
Server:这个表示的服务器,操作服务器的一些东西使用这个,如Server.Mappath转换服务器路径,Server.CreateObject实例化一个组件
灵魂腐蚀 该用户已被删除
8#
发表于 2015-3-11 16:45:05 | 只看该作者
尽管MS自己讲C#内核中更多的象VC,但实际上我还是认为它和Java更象一些吧。首先它是面向对象的编程语言,而不是一种脚本,所以它具有面向对象编程语言的一切特性,比如封装性、继承性、多态性等等,这就解决了刚才谈到的ASP的那些弱点。
再现理想 该用户已被删除
9#
发表于 2015-3-27 03:10:30 | 只看该作者
ASP的语言不仅仅只是命令格式差不多,而是包含在<%%>之内的命令完全就是VB语法。虽然ASP也是做为单独的一个技术来提出的,但他就是完全继承了VB所有的功能。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-6-10 13:49

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表