<em id="0a85b"><option id="0a85b"></option></em>

<abbr id="0a85b"></abbr>

      <nobr id="0a85b"></nobr>
        <tr id="0a85b"></tr>
        9久久伊人精品综合,亚洲一区精品视频在线,成 人免费va视频,国产一区二区三区黄网,99国产精品永久免费视频,亚洲毛片多多影院,精品久久久无码人妻中文字幕,无码国产欧美一区二区三区不卡
        學習啦 > 創(chuàng)業(yè)指南 > 職場 > 面試題 >

        有哪些ASP面試題

        時間: 書榮1192 分享

          ASP即Active Server Pages,是MicroSoft公司開發(fā)的服務器端腳本環(huán)境,可用來創(chuàng)建動態(tài)交互式網頁并建立強大的web應用程序。下面是學習啦小編為你整理的ASP面試題,希望對你有所幫助!


          第一題:ASP中,VBScript的唯一的數(shù)據(jù)類型是什么?

          第二題:在ASP中,VBScript有多種控制程序流程語句,如If…Then, Select… Case,

          For … Next, Do … Loop, Exit等語句。請為這五個語句分別寫一段使用的代碼。

          第三題:請看如下代碼

          這段代碼執(zhí)行后,運行結果是什么?并解釋一下為什么?

          第四題:在ASP中,Server中有一個方法是URLEncode(string)

          如: response.write Server.URLEncode(“Test.ASP?TestNum=100&TestStr=你好”)

          結果輸出: Test%2EASP%3FTestNum%3D100%26TestStr%3D%C4%E3%BA%C3

          在ASP中,有ASC(String),Hex(Number),Mid(String,start,[,length])這三個可能用

          到的函數(shù),如果是三個函數(shù)的用法

          如:

          ASC(“A”)=65,ASC(“你”)= -15133

          Hex(65)=”41″,Hex(-15133)=”C4E3″

          Mid(“hello”,2,1)=”e”, mid(“this is test!”,9,2)=”te”

          現(xiàn)在要求編寫編碼函數(shù)Function TestEncode(SourceString),及一個解碼函數(shù)

          Function TestDecode(CodeString)。TestEncode(SourceString)是將SourceString

          串中非字母且非漢字且非數(shù)字的字符轉換為對應Ansi編碼的十六進制編碼!

          如:

          TestEncode(“Test.ASP?TestNum=100&TestStr=你好”)=

          “Test%2EASP%3FTestNum%3D100%26TestStr%3D你好”

          而TestDecode(CodeString)是將編碼的串還原,是TestEncode的逆函數(shù)。

          第五題:

          編寫一個星期的函數(shù)GetWeek(aDate)

          返回”星期一、星期二、星期三…”

          第六題:

          用ASP輸出九九乘法口決表的網頁

          輸出如下:

          1*1=1

          1*2=2 2*2=4

          1*3=3 2*3=6 3*3=9

          …

          要求編寫一個完整的ASP文件

          第七題到第九題

          已知SQL Server數(shù)據(jù)庫的有一個數(shù)據(jù)庫TestDB,學生表結構如下:

          表名:Student

          字段名 類型 說明

          id int 自增1

          name varchar(16)

          sex char(1) ‘F’表示女性,’M'表示男性

          … …

          已知已經定義了ADODB.Connection對象ConnTestDB已連接了上述的TestDB數(shù)據(jù)庫

          可以在以后的測試題中直接引用該對象.

          第七題:

          編寫ASP代碼,將Student中的人的姓名及性別列出來,并給統(tǒng)計學生人數(shù)如下:

          姓名 性別

          張三 男

          李四 男

          王五 女

          … …

          總共有100個學生

          第八題:

          在上述數(shù)據(jù)庫中,有一個表存放學生的得分的,結構如下:

          表名:Score

          字段名 類型 說明

          StuID int 學生的ID值,關系是:Score.StuID=Student.ID

          Chinese int

          math int

          要求輸出內容:

          姓名 語文 數(shù)學 總成績

          張三 60 100 160

          …

          請編寫實現(xiàn)上述功的ASP代碼

          第九題:

          已知:

          某一學生:陳六,男,語文80分,數(shù)學60分,現(xiàn)要求編寫ASP代碼

          將該學的數(shù)據(jù)插入數(shù)據(jù)庫中,分別插入到上述的兩個表Student,Score表中。

          網友提供的答案:

          ?

          第一題:Variant

          第二題:

          dim x,y

          if x=”" then

          x=1

          end if

          select case x

          case 1

          x=x+1

          case 2

          x=x+2

          end select

          for y=0 to x

          response.write y

          if y=2 then exit for

          next

          do

          x=x+1

          if x=4 then exit do

          loop while x<5

          第三題:

          運行結果是:testA

          原因是:testA所附值的是一個全局變量TestString

          testB因為有Dim TestString這句定義,所以它所附值的只是一個局部變量。

          第四題:

          dim str

          str=”Test.ASP?TestNum=100&TestStr=你好”

          function TestEncode(f_Str)

          0Adim str_len

          dim for_x

          dim char

          dim ansi

          str_len=len(f_Str)

          for for_x=1 to str_len

          char=mid(f_Str,for_x,1)

          ansi=asc(char)

          if (ansi=>48 and ansi65 and ansi97 and ansi225) then

          TestEncode=TestEncode&char

          else

          TestEncode=TestEncode&”"&cstr(Hex(ansi))

          end if

          next

          end function

          function TestDecode(f_Str)

          0Adim str_len

          dim for_x

          dim char

          dim ansi

          str_len=len(f_Str)

          for for_x=1 to str_len

          char=mid(f_Str,for_x,1)

          if char=”" then

          ansi=mid(f_Str,for_x+1,2)

          TestDecode=TestDecode&chr(clng(“&H”&ansi))

          for_x=for_x+2

          else

          TestDecode=TestDecode&char

          end if

          next

          end function

          response.Write TestEncode(str)&””

          response.Write TestDecode(TestEncode(str))

          第五題:

          function GetWeek(aDate)

          if isdate(aDate) then

          GetWeek=weekdayname(WeekDay(aDate))

          end if

          end function

          response.Write GetWeek(“2002/1/3″)

          第六題:

          dim x,y

          for x=1 to 9

          for y=1 to x

          response.Write y&”*”&x&”=”&x*y&” ”

          if x=y then response.Write “”0D

          next

          next

          第七題:

          set rs=ConnTestDB.execute(“Select top 100 name,sex from Student order by id,sex”)

          response.Write “姓名 性別”

          while not rs.eof

          response.Write rs(“name”)&” ”&rs(“sex”)&””

          rs.movenext

          wend

          第八題:

          set rs=ConnTestDB.execute(“Select name,Chinese,math from Student,Score where StuID=ID”)

          response.Write “姓名 語文 數(shù)學 總成績”

          while not rs.eof

          response.Write rs(“name”)&” ”&rs(“Chinese”)&” ”&rs(“math”)&” ”&(rs(“Chinese”)+rs(“math”))&””

          rs.movenext

          wend

          第九題:

          dim StrudentID,StrudentName,StrudentSex

          StrudentName=”陳六”

          StrudentSex=”男”

          S_Chinese=80

          S_math=60

          Function yhsql(data)

          yhsql=”‘”&replace(data,”‘”,”””)&”‘”

          End Function

          ConnTestDB.execute “insert into Student (name,sex) value (“26yhsql(StrudentName)&”,”&yhsql(StrudentSex)&”) ”

          StrudentID=ConnTestDB.execute(“select max(id) as sid from Strdent where name=”&yhsql(StrudentName))(“sid”)

          ConnTestDB.execute “insert into Score (StuID,Chinese,math) value (“&S_Chinese&”,”&S_math&”) ”

          —————————————————————-

          第7到9題沒有經過測試,可能會有語法上的錯誤。

          還有,第9題的處理方法我個人認為不是很妥當,請各位指點一下還有什么別的方法嗎?:)


        面試題相關文章:

        1.求職面試題目及答案大全

        2.經典面試題

        3.競聘上崗面試題及答案

        4.抗壓能力面試題及參考答案

        5.經典情景面試題及參考答案

        4064187 主站蜘蛛池模板: 黄色一级片免费观看| 青青草a国产免费观看| 性夜影院爽黄e爽| 夜夜爽夜夜叫夜夜高潮漏水| 最新国产色视频在线播放| 吉川爱美一区二区三区视频| 极品无码国模国产在线观看| 综合色区亚洲熟女妇p| 亚洲国产精品一区二区第一页| 少妇人妻av毛片在线看| 亚洲国产熟女一区二区三区| 亚洲国产精品成人av网| 亚洲中文久久久精品无码| 人妻少妇邻居少妇好多水在线 | 99热亚洲人色精品国产88| 亚洲大片免费| 妺妺窝人体色www看美女| 野花香视频在线观看免费高清版| 人妻少妇精品视频二区| 日韩本精品一区二区三区| 亚洲熟妇精品一区二区| 国产成人免费| 亚洲中文字幕日产无码成人片| 精品国产肉丝袜在线拍国语| 国产成人精品久久一区二| 深夜国产成人福利在线观看女同 | 美女一区二区三区亚洲麻豆| 日本一区二区三区专线| 欧美精品一区二区三区在线观看| 国产精品亚洲五月天高清| 精品人妻久久久久久888| 国产日韩精品视频无码| 91精品乱码一区二区三区| 日韩中文字幕精品人妻| 欧美日韩国产va在线观看免费| 久久无码中文字幕免费影院蜜桃 | 毛片一级在线| 西西444www高清大胆| 亚洲女同在线播放一区二区| 亚洲熟妇精品一区二区| 饥渴少妇高潮正在播放|