1. Which of the following statements regarding WebSockets is true?
Answers:
<canvas id=”e” width=”200″ height=”200″></canvas>
<script>
var canvas = document.getElementById(“e”);
//insert code here
context.fillStyle = “blue”;
context.font = “bold 16px Arial”;
context.fillText(“Zibri”, 100, 100);
</script>
Answers:
Answers:
Answers:
<option value=”89″>Item 1</option>
<option value=”90″>Item 2</option>
Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
<canvas id=”e” width=”200″ height=”200″></canvas>
<script>
var canvas = document.getElementById(“e”);
//insert code here
context.fillStyle = “blue”;
context.font = “bold 16px Arial”;
context.fillText(“Zibri”, 100, 100);
</script>
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
var c=document.getElementById(“myCanvas”);
var ctx=c.getContext(“2d”);
var img=document.getElementById(“img”);
Which method will correctly draw an image in the x=10, y=10 position?
Answers:
Answers:
var sound = new Audio(“file.wav”);
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
47. The following link is placed on an HTML webpage:<a href=”http://msdn.com/” target=”_blank”> MSDN </a>.What can be inferred from it?
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
<command type=”?”>Click Me!</command>
Answers:
Answers:
Answers:
Answers:
<option value=”89″>Item 1</option>
<option value=”90″>Item 2</option>
Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?
Answers:
Answers:
Ans:
Ans:
Ans:
Answers:
- It communicates with the server with only the data required by the application.
- It lowers the latency of connections for interactive web applications.
- It scales better and consumes less server resources than HTTP AJAX/long-poll.
- All of the above.
<canvas id=”e” width=”200″ height=”200″></canvas>
<script>
var canvas = document.getElementById(“e”);
//insert code here
context.fillStyle = “blue”;
context.font = “bold 16px Arial”;
context.fillText(“Zibri”, 100, 100);
</script>
Answers:
- var context = canvas.getContext();
- var context = canvas.getElementById(“context”);
- var context = canvas.getContext(“2d”);
- var context = canvas.getElementById(“2d”);
Answers:
- It is used to define important text.
- It is used to define computer code text.
- It is used to define sample computer code.
- It is used to define a definition term.
Answers:
- <object> <param name=”allowFullScreen” value=”true” />
- <video allowFullScreen=”true”>
- <video height=”100%” width=”100%”>
- None of these.
<option value=”89″>Item 1</option>
<option value=”90″>Item 2</option>
Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?
Answers:
- 89
- 90
- Item 1
- Item 2
Answers:
- Drag and drop files from the desktop
- Full file system access
- Use of the HTML5 File API
- Use of files as HTML5 input types
Answers:
- _blank
- _self
- _top
- _bottom
Answers:
- An input tag button can be a reset button too.
- A button tag button can be a reset button too.
- An input tag button can include images as well.
- A button tag can include images as well.
Answers:
- toDataURL()
- saveAsImage()
- saveFile()
- exportImage()
Answers:
- Yes
- No
Answers:
- It gets fired when an element has been dragged to a valid drop target.
- It gets fired when an element leaves a valid drop target.
- It gets fired at the end of a drag operation.
- It gets fired while an element is being dragged.
Answers:
- The application cache is programmatically updated.
- The application cache gets automatically cleared by the browser.
- The manifest file is modified.
- The user clears their browser’s data storage for the site.
Answers:
- DD-MM-YYYY
- YYYY-MM-DD
- MM-DD-YYYY
- YYYY-DD-MM
Answers:
- <link rel=”icon” href=”abc.jpg” sizes=”16×16″>
- <link rev=”stylesheet” href=”abc.css” type=”text/css” target=”_parent”>
- <link rel=”alternate” type=”application/pdf” hreflang=”fr” href=”manual-fr”>
Answers:
- It means that streaming of a voice/video frame is direct, without using any server between them.
- It means that streaming of a voice/video frame is first between one peer to the server then the server to another peer.
- Communication does not rely on a shared relay server in the network.
Answers:
- var video = document.getElementsByTagName(‘video’)[0]; video.onended = function(e) { }
- var video = document.getElementsByTagName(‘video’)[0]; video.onPlayend = function(e) { }
- var video = document.getElementsByTagName(‘video’)[0]; video.onPlayFinish = function(e) { }
- var video = document.getElementsByTagName(‘video’)[0]; video.onPlayBackended = function(e) { }
Answers:
- WebSockets can perform bi-directional (client-server and vice versa) data transfers, while SSEs can only push data to the client/browser.
- SSEs can perform bi-directional (client-server and vice versa) data transfers, while WebSockets can only push data to the client/browser.
- WebSockets and SSEs are functionally equivalent.
- None of these.
Answers:
- Using _gaq.push([‘_trackPageLoadTime’]) with Google Analytics.
- Using the Navigation Timing JavaScript API.
- Page load times cannot be estimated.
- Using built-in JavaScript methods.
Answers:
- <tr class=”foo” data-id-type=”4″>
- <tr class=”foo” id-type=”4″>
- <tr class=”foo” data-id_type=”4″>
- All of the above.
Answers:
- #myCanvas {height: 100%; width: 100%;}
- <script type=”text/javascript”> function resize_canvas(){ canvas = document.getElementById(“canvas”); if (canvas.width < window.innerWidth) { canvas.width = window.innerWidth; } if (canvas.height < window.innerHeight) { canvas.height = window.innerHeight; } } </script>
- It depends upon the complexity of the canvas, and the frequency of redraws.
- Calling the JavaScript getWidth() function.
Answers:
- toDataURL
- toImageURL
- saveAsPNG
- saveAsJPEG
Answers:
- localStorage.setItem(‘obj’, obj);
- localStorage.setItem(‘obj’, JSON.stringify(obj));
- localStorage.setItem(‘testObject’, JSON.parse(testObject));
- localStorage.setItem(obj);
<canvas id=”e” width=”200″ height=”200″></canvas>
<script>
var canvas = document.getElementById(“e”);
//insert code here
context.fillStyle = “blue”;
context.font = “bold 16px Arial”;
context.fillText(“Zibri”, 100, 100);
</script>
Answers:
- var context = canvas.getContext();
- var context = canvas.getElementById(“context”);
- var context = canvas.getContext(“2d”);
- var context = canvas.getElementById(“2d”);
Answers:
- input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
- input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
- noindex:-o-prefocus, input[type=number] { padding-right: 1.2em; }
- input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; padding-right: 1.2em; }
Answers:
- <input type=”text” pattern=”[0-9]*” />
- <input type=”number” />
- <input type=”text” pattern=”d*”/>
- <input type=”text” pattern=”number”/>
Answers:
- <object type=”application/pdf” data=”filename.pdf” width=”100%” height=”100%”/>
- <object type=”application/pdf” id=”filename.pdf” width=”100%” height=”100%”/>
- <input type=”application/pdf” data=”filename.pdf” width=”100%” height=”100%”/>
- <input type=”application/pdf” src=”filename.pdf” width=”100%” height=”100%”/>
Answers:
- isCanvasSupported()
- !!document.createElement(“canvas”)
- !isCanvasSupported()
- !!window.HTMLCanvasElement
Answers:
- onstalled
- onwaiting
- onsuspend
- oninvalid
Answers:
- console.log(WebSocket ? ‘supported’ : ‘not supported’);
- console.log(window.WebSocket ? ‘supported’ : ‘not supported’);
- console.log(window[WebSocket] ? ‘supported’ : ‘not supported’);
- console.log(window[‘WebSocket’] ? ‘supported’ : ‘not supported’);
Answers:
- CCTV
- MPEG 4
- Ogg
- 3GPP
Answers:
- <input name=”username” required /> <input name=”pass” type=”password” required/>
- <input name=”username” validate=”true”/> <input name=”pass” type=”password” validate=”true”/>
- <input name=”username” validate/> <input name=”pass” type=”password” validate/>
- There is no way to implement client-side validation for the username and password fields in HTML5.
Answers:
- controls
- autoplay
- disabled
- preload
var c=document.getElementById(“myCanvas”);
var ctx=c.getContext(“2d”);
var img=document.getElementById(“img”);
Which method will correctly draw an image in the x=10, y=10 position?
Answers:
- ctx.drawImage(img,10,10);
- context.drawImage(img,20,10,10,10);
- context.drawImage(img,10,20,10,10,20,20,10,10);
- All of these
Answers:
- localStorage.setItem(‘testObject’, JSON.stringify(testObject))
- localStorage.setItem(‘testObject’, testObject)
- localStorage.add(‘testObject’, testObject)
- localStorage.addItem(‘testObject’, testObject)
var sound = new Audio(“file.wav”);
Answers:
- sound.begin();
- sound.resume();
- sound.start();
- sound.play();
Answers:
- var snd = new Audio(“file.wav”); snd.play();
- <audio controls> <source src=”file.ogg” type=”audio/ogg”> <source src=”file.mp3″ type=”audio/mpeg”> </audio>
- <source src=”file.mp3″ type=”audio/mpeg”>
- All of these.
Answers:
- <!doctype html>
- <!DOCTYPE html>
- <!DOCTYPE HTML5>
- <!DOCTYPE HTML>
Answers:
- <a href=”mailto:webmaster@xcompany.com”>webmaster</a>
- <a href=”webmaster@xcompany.com”>webmaster</a>
- <a http=”mail:webmaster@xcompany.com”>webmaster</a>
- <mail http=”send:webmaster@xcompany.com”>webmaster</mail>
Answers:
- Polling URLs in background
- Syntax highlighting without blocking code editing capabilities in online IDEs
- Motion tracking input in realtime with a video element
- All of these.
Answers:
- onerror
- onended
- onloadeddata
- onemptied
Answers:
- accept
- autofocus
- autocomplete
- formtarget
Answers:
- Server-Sent Events
- SVG
- Canvas
- Web Workers
Answers:
- Every HTML element can have an ARIA role attribute specified.
- Every HTML element is required have an ARIA role attribute specified.
- The attribute must have a value that is a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs to.
- There is no ARIA attribute called “role”.
Answers:
- play
- loop
- mute
- pause
Answers:
- True
- False
Answers:
- The <hr> element acts in the same way as the tab key and the <br> element acts in the same way as the shift key.
- The <h>r element is used to insert the horizontal line within the document and the <br> element is used to insert a single line break.
- The <hr> element is used to put a line across the page and the <br> element acts in the same way as a return/enter key press.
47. The following link is placed on an HTML webpage:<a href=”http://msdn.com/” target=”_blank”> MSDN </a>.What can be inferred from it?
Answers:
- It will open the site msdn.com in the same window.
- It will open the site msdn.com in a new window.
- It will open the site msdn.com in a frame below.
- It will not be clickable as it is not formed correctly.
Answers:
- now
- 2013-05-30
- 2013-30-05
- today
Answers:
- True
- False
Answers:
- 65536
- 64
- There is no limit.
- None of these.
Answers:
- foo & bar
- foo &0 bar
- foo &0; bar
- foo&&& bar
Answers:
- context.clearRect ( x , y , w , h );
- canvas.width = canvas.width;
- context.clear();
- All of these.
Answers:
- sizes
- rev
- rel
- charset
<command type=”?”>Click Me!</command>
Answers:
- button
- command
- checkbox
- radio
Answers:
- autocomplete
- autofocus
- placeholder
- formnovalidate
Answers:
- onfocus
- onload
- onblur
- onselect
Answers:
- It is used to define the start of a term in a definition list.
- It is used to define attribute values for one or more columns in a table.
- It is used to define the start of a short quotation.
- It is used to define what to show browsers that do not support the ruby element.
<option value=”89″>Item 1</option>
<option value=”90″>Item 2</option>
Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?
Answers:
- 89
- 90
- Item 1
- Item 2
Answers:
- var localStorage[names]=new Array(); localStorage.names[0]=prompt(“New member name?”);
- var names = []; names[0] = prompt(“New member name?”); localStorage[“names”] = JSON.stringify(names); var storedNames = JSON.parse(localStorage[“names”]);
- Storage.prototype.setObj = function(key, obj) { return this.setItem(key, JSON.stringify(obj)) } Storage.prototype.getObj = function(key) { return JSON.parse(this.getItem(key)) }
- localStorage.setItem(‘names_length’, names.length); localStorage.setItem(‘names_0’, names[0]); localStorage.setItem(‘names_1’, names[1]); localStorage.setItem(‘names_’ + n, names[n]);
Ans:
- canvas
- summary
- aside
- video
Ans:
- Long Polling Ajax Requests
- Server-sent Events
- WebSockets
- JavaScript objects on the client via JSON.parse().
Ans:
- <input type=”text” pattern=”[0-9]*” />
- <input type=”number” />
- <input type=”text” keyboard=”numeric” />
- <input type=”text” keyboard=”number11″ />
No comments:
Post a Comment