• <output id="aynwq"><form id="aynwq"><code id="aynwq"></code></form></output>

    <mark id="aynwq"><option id="aynwq"></option></mark>
  • <mark id="aynwq"><option id="aynwq"></option></mark><label id="aynwq"><dl id="aynwq"></dl></label>
  • 學習啦 > 創業指南 > 職場 > 面試題 >

    有哪些ASP面試題

    時間: 書榮1192 分享

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


      第一題:ASP中,VBScript的唯一的數據類型是什么?

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

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

      第三題:請看如下代碼

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

      第四題:在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])這三個可能用

      到的函數,如果是三個函數的用法

      如:

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

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

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

      現在要求編寫編碼函數Function TestEncode(SourceString),及一個解碼函數

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

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

      如:

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

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

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

      第五題:

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

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

      第六題:

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

      輸出如下:

      1*1=1

      1*2=2 2*2=4

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

      …

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

      第七題到第九題

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

      表名:Student

      字段名 類型 說明

      id int 自增1

      name varchar(16)

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

      … …

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

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

      第七題:

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

      姓名 性別

      張三 男

      李四 男

      王五 女

      … …

      總共有100個學生

      第八題:

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

      表名:Score

      字段名 類型 說明

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

      Chinese int

      math int

      要求輸出內容:

      姓名 語文 數學 總成績

      張三 60 100 160

      …

      請編寫實現上述功的ASP代碼

      第九題:

      已知:

      某一學生:陳六,男,語文80分,數學60分,現要求編寫ASP代碼

      將該學的數據插入數據庫中,分別插入到上述的兩個表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 “姓名 語文 數學 總成績”

      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级中文片| 色噜噜在线观看| 欧美人与zoxxxx另类| 国产高跟踩踏vk| 亚洲综合图片网| 99久久精品国产一区二区蜜芽| 男人的j进入女人的p的动态图| 好男人在线社区www在线视频免费 好男人在线社区www影视下载 | 涩涩涩在线视频| 在线观看网站污| 亚洲精品www| 18禁裸体动漫美女无遮挡网站 | 国产婷婷综合在线视频中| 亚洲AV无码成人精品区狼人影院| 婷婷综合五月天| 日韩欧美高清视频| 国产区精品在线| 中文字幕日本最新乱码视频| yy6080理论影院旧里番| 男朋友吃我的妹妹怎么办呢| 天天操天天摸天天舔| 亚洲精品福利视频| 一本色道久久综合亚洲精品高清| 欧美乱妇在线观看| 国产在视频线精品视频| 国产又大又粗又硬又长免费| 久久精品日日躁夜夜躁欧美| 饥渴难耐16p| 成人片在线观看地址KK4444| 公的大龟慢慢挺进我的体内视频 | 伊人不卡久久大香线蕉综合影院| a毛片视频免费观看影院| 欧美黑人videos巨大18tee| 国产精品原创巨作av女教师| 久久精品成人免费观看| 色偷偷偷久久伊人大杳蕉| 好男人社区www在线官网| 亚洲激情在线观看| 日本h在线精品免费观看| 日本18xxx| 免费一区二区三区四区|