2022英文JavaScript面試題一_第1頁(yè)
2022英文JavaScript面試題一_第2頁(yè)
2022英文JavaScript面試題一_第3頁(yè)
2022英文JavaScript面試題一_第4頁(yè)
2022英文JavaScript面試題一_第5頁(yè)
已閱讀5頁(yè),還剩2頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、內(nèi)容摘要:1. What is JavaScript?JavaScript is a platform-independent,event-driven, interpreted client-side scripting and 內(nèi)容正文:1. What is JavaScript?JavaScript is a platform-independent,event-driven, interpreted client-side scripting and programming language developed by Netscape Communications Corp. and

2、Sun Microsystems.2.How to read and write a file using javascript?I/O operations like reading or writing a file is not possible with client-side javascript.However , this can be done by coding a Java applet that reads files for the script. 3.How to detect the operating system on the client machine? I

3、n order to detect the operating system on the client machine, the navigator.appVersion string (property) should be used. 4.Where are cookies actually stored on the hard disk? This depends on the users browser and OS.In the case of Netscape with Windows OS,all the cookies are stored in a single file

4、called cookies.txtc:Program FilesNetscapeUsersusernamecookies.txtIn the case of IE,each cookie is stored in a separate file namely HYPERLINK mailto: .c:WindowsCookies5.What can javascript programs do? Generation of HTML pages on-the-fly without accessing the Web server. The user can be given control

5、 over the browser like User input validationSimple computations can be performed on the clients machineThe users browser, OS, screen size, etc. can be detected Date and Time Handling6.How to set a HTML documents background color? document.bgcolor property can be set to any appropriate color.7.What d

6、oes the Access is Denied IE error mean? The Access Denied error in any browser is due to the following reason.A javascript in one window or frame is tries to access another window or frame whose documents domain is different from the document containing the script.8.Is a javascript script faster tha

7、n an ASP script?Yes.Since javascript is a client-side script it does require the web servers help for its computation,so it is always faster than any server-side script like ASP,PHP,etc.9.Are Java and JavaScript the Same?No.java and javascript are two different languages.Java is a powerful object -

8、oriented programming language like C+,C whereas Javascript is a client-side scripting language with some limitations.10.How to embed javascript in a web page?javascript code can be embedded in a web page between tags11.How to access an external javascript file that is stored externally and not embed

9、ded?This can be achieved by using the following tag between head tags or between body tags.where abc.js is the external javscript file to be accessed.12.What is the difference between an alert box and a confirmation box?An alert box displays only one button which is the OK button whereas the Confirm

10、 box displays two buttons namely OK and cancel.13.What is a prompt box?A prompt box allows the user to enter input by providing a text box.14.How to hide javascript code from old browsers that dont run it?Ans.Use the below specified style of comments orUse the some html code tags and code the displa

11、y html statements between these and this will appear on the page if the browser does not support javascript15. How to comment javascript code?Ans.Use / for line comments and/*/ for block comments16.Name the numeric constants representing max,min valuesAns.Number.MAX_VALUENumber.MIN_VALUE17.What does

12、 javascript null mean?Ans.The null value is a unique value representing no value or no object.It implies no object,or null string,no valid boolean value,no number and no array object.18.What does undefined value mean in javascript?Ans.Undefined value means the variable used in the code doesnt exist

13、or is not assigned any value or the property doesnt exist.19.What is the difference between undefined value and null value?Ans.(i)Undefined value cannot be explicitly stated that is there is no keyword called undefined whereas null value has keyword called null(ii)typeof undefined variable or proper

14、ty returns undefined whereastypeof null value returns object20.What is variable typing in javascript?Ans.It is perfectly legal to assign a number to a variable and then assign a string to the same variable as followsexamplei = 10;i = string;This is called variable typing21.Does javascript have the c

15、oncept level scope?Ans.No.Javascript does not have block level scope,all the variables declared inside a function possess the same level of scope unlike c,c+,java.22. What are undefined and undeclared variables?Ans.Undeclared variables are those that are not declared in the program (do not exist at

16、all),trying to read their values gives runtime error.But if undeclared variables are assigned then implicit declaration is done .Undefined variables are those that are not assigned any value but are declared in the program.Trying to read such variables gives special value called undefined value.23.

17、What is = operator ?Ans.= is strict equality operator ,it returns true only when the two operands are having the same value without any type conversion.24.What does the delete operator do?Ans.The delete operator is used to delete all the variables and objects used in the program ,but it does not delete variables declared with var keyword.25.What does break and continue statements do?Ans.Continue statement continues the current loop (if label not specified) in a new iterat

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論