Il 0% ha trovato utile questo documento (0 voti)
30 visualizzazioni30 pagine

Css s-24

Important of css

Caricato da

sanchitahiwrale
Copyright
© © All Rights Reserved
Per noi i diritti sui contenuti sono una cosa seria. Se sospetti che questo contenuto sia tuo, rivendicalo qui.
Formati disponibili
Scarica in formato PDF o leggi online su Scribd
Il 0% ha trovato utile questo documento (0 voti)
30 visualizzazioni30 pagine

Css s-24

Important of css

Caricato da

sanchitahiwrale
Copyright
© © All Rights Reserved
Per noi i diritti sui contenuti sono una cosa seria. Se sospetti che questo contenuto sia tuo, rivendicalo qui.
Formati disponibili
Scarica in formato PDF o leggi online su Scribd
Sei sulla pagina 1/ 30
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) GSOAEC - 27001 - 2005 Certified) SUMMER - 2024 EXAMINATION MODEL ANSWER Subject: Client Side Scripting Language Subject Code: | 22519 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The mode! answer and the answer written by candidate may vary but the examiner may try to assess the understanding level of the candidate. 3) The language errors such as grammatical, spelling errors should not be given more Importance (Not applicable for subject English and Communication Skils 4) While assessing figures, examiner may give credit for principal components indicated in the figure. The figures drawn by candidate and model answer may vary. The examiner may give credit for any equivalent figure drawn. 5) Credits may be given step wise for numerical problems. In some cases, the assumed constant values may vary and there may be some difference in the candidate's answers and model answer. 6) In case of some questions credit may be given by judgement on part of examiner of relevant answer based on candidate's understanding, 7) For programming language papers, credit may be given to any other program based on equivalent concept. 8) As per the policy decision of Maharashtra State Government, teaching in English/Marathi and Bilingual (English + Marathi) medium is introduced at first year ot AICTE diploma Programme from academic year 2021-2022. Hence if the students in first year (first and second semesters) write answers in Marathi or bilingual language (English +Marathi), the Examiner shall consider the same and assess the answer based on matching of concepts with model answer. Q.] sub ‘Answer Marking No} QN. ‘Scheme 1 ‘Attempt any FIVE of the following: 10 a) _| WiteestresotSaascrpt 2M Ans, It is an object-based scripting language. Any 2 features 2 It gives the user more control over the browser. tseeach 3. Itis light weighted. 4, Client — Side Technology 5. JavaScript is interpreter based scripting language. 6. JavaScript is case sensitive. 7. JavaScript is object based language as it provides predefined objects. b) List and describe any four methods of Math object 2M Page 1/30 Mecmenisonntierectcmne Ey studocu Downloaded by Srkaccount (awsitsik@gmailcom) MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC - 27001 - 2005 Certified) SUMMER - 2024 EXAMINATION MODEL ANSWER Subject: Client Side Scripting Language Subject Code: | 22519 Ans. | Math. round(value)- It returns value rounded to its nearest integer. 1s " " Any 4 methods Math.ceil(value)- It retums value rounded up to its nearest integer. VoM each Math.floor(value)- It returns value rounded down to its nearest integer. Math.trunc( Value)- It returns value as integer part of value. Math.pow (number, power)- It retums value as power of specified number. Math.sqrt(value)- It retums square root of value, Math.abs(value)- It returns absolute -positive value for given value. Math.min ()- It returns lowest value in a list of values. Math.max ()- It returns highest value in a list of values. ©) _ | Write a JavaScript program that will print even numbers from 1[ 2M to 20 Correct Ans, | Note: Any other relevant logic shall be considered Program 2M 4) | Write a JavaScript program to display the elements of array in 2M. ascending and descending order. Ans, | Note: Any other relevant logic shall be considered Correct Correct logic 2M Correct syntax 2M Downloaded by S:kaccount ([email protected]) Page 6/30 Subject: ent Side Scripting Language Subject Code: MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC - 27001 - 2005 Certified) SUMMER - 2024 EXAMINATION MODEL ANSWER 22519 a) Ans, State the use of following methods: i) charCodeat( ) ii) fromCharCode ( ) 1. charCodeAt( ): This method is used to return a unicode of specified character. Syntax: var code: Example: var ch= document. write(ch.charCodeAt( )); tter.charCodeAt( ); Output: 97 2. fromCharCodet ): This method is used to return a character for specified code Syntax: var character=String fromCharCode(code); Example: var character=String.fromCharCode(97); Document.vwrite(ch); Output: a 4M Use of each ‘method a) Ans. ‘Attempt any THREE of the following: Explain Associative arrays in detail. Associative arrays are basically objects in JavaScript where indexes are replaced by user-defined keys. Syntax: var arr = {key]:'valuel’, key2:value2'] Here, arr, is an associative array with keyl, key2 being its keys or string indexes and value! & value 2 are its elements. Example: var arr = { "Company Name": ‘Flexiple’, "ID": 123}: ‘The content or values of associative arrays is accessed by keys. An associative array is an array with string keys rather than numeric keys. For example: var arrAssociative = ‘Company Name": Flexiple’, ID": 123 12 4M Correct explanation aM Thi ocrert arta ret charge on @ studocu Downloaded by Sckaccount (awej4stk@gmailcom) Page 7/30 ce, uae MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (SONEC - 27001 - 2005 Certified) Subject: Client Side Scripting Language Subject Code: [22519 SUMMER - 2024 EXAMINATION MODEL ANSWER var artNormal = [*Flexiple", 123]; Here, the keys of the associative array are “Company Name” & “ID” whereas in the normal array. The keys or index is 0 & 1 b) | Write a JavaScript function that checks whether a passed string | 4M is palindrome or not. Ans. | Note: Any other relevant logic shall be considered Somegtleaie function isPalindrome(str) { str = strreplace(/[*A-Za-20-9)/g, ").toLowerCase(): Comeau return str === str split(").reverse(),join("); } console.log(isPalindrome("A man, a plan, a canal, Panama); // Output: true console-log(isPalindrome("racecar")); // Output: true console.log(isPalindrome("“hello")); // Output: false ©) | Explain how to add and sort elements in array with suitable| 4M example. Ans, | Adding Elements to an Array: In JavaScript, you can add elements to an array using various | #xplanation methods, such as push), unshift(), or direct assignment to a specific | gen in index. suitable Using push(): somos “The push() method adds one or more elements to the end of an array | Any one and returns the new length of the array. med Using unshitt(: ‘The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array. Using spliced): ‘This method can be used to add new items to an array, and removes elements from an array. Syntax: arr splice(start_index,removed_elements,list_of_elemnts_to_be_add ed); Page 8/30 Downloaded by Sckaccount ([email protected]) MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC - 27001 - 2005 Certified) SUMMER - 2024 EXAMINATION MODEL ANSWER Subject: Client Side Scripting Language Subject Code: | 22519 Parameter: *The first parameter defines the position where new elements should be added (spliced in). “The second parameter defines how many elements should be removed. ‘The list_of_elemnts_to_be_added parameter define the new elements to be added optional). Using length property: The length property provides an easy way to append a new element toan array, Example Sorting Elements in an Arra JavaScript provides the sort() method to sort the elements of an array | 2xPlanation ; af sorting in place and returns the sorted array elewents with Example suitable let numbers = (5,2, 8, 1.4]: oe numbers.push(7); console.log(" Array before sorting:", numbers); numbers.sort((a, b) => a - by; console.log(" Array after sorting:", numbers): ‘@)_ | Explain the term browser location and history in details, aM Ans. | Window Location Object: In JavaScript, the windowlocation object represents the current URL of the browser window. It provides properties and methods to ‘manipulate the URL, Page 9/30 Tudceriaaicieredownen EY studocu Downloaded by Srkaccount ([email protected]) MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC - 27001 - 2005 Certified) SUMMER - 2024 EXAMINATION MODEL ANSWER Subject: Client Side Scripting Language Subject Code: | 22519 i ic Explanation window.location.hre! of location Returns the complete URL of the current page. 2M window.location.hostname: Returns the domain name of the web server. window.location.pathname: Returns the path and filename of the current page. window.location. protocol: Returns the protocol (HTTP, HTTPS, etc.) of the current page. window.location.assign(url): Loads the specified URL. window location.reload(foreeReload): Reloads the current page. 1/ Example: Changing browser location ‘window location href = "https:/example.com/page2"; sgcacn Window History of history 2M The window.history object can be written without the window prefix. To protect the privacy of the users, there are limitations to how JavaScript can access this object, Some methods: historysback() - same as clicking back in the browser history.forward() - same as clicking forward in the browser Window History Back The history.backQ method loads the previous URL in the history list. This is the same as clicking the Back button in the browser. Example: Hello welcome to JavaScript . ‘Attempt any TWO of the following: 12 a) | Write HTML script that displays textboxes for accepting] 6M username and password. Write proper JavaScript such that when the user clicks on submit button Page 18/30 Downloaded by Srkaccount (awel4stk@gmallcom) Subject: Client Side Scripting Language Subject Code: | 22519 MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC - 27001 - 2005 Certified) SUMMER - 2024 EXAMINATION MODEL ANSWER i) All textboxes must get disabled and change the color to ‘RED; and with respective labels ii) Prompt the error message if the password is less than six characters Note: Any other relevant logic shall be considered
Create textboxes 2M Disable textboxes with red color aM Password validation 2M “is documenta rae a of charge on § studocu Downloaded by Srkaccount ([email protected]) Page 19/30 MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISOAEC - 27001 - 2005 Certified) Subject: Client Side Scripting Language Subject Code: [22519 SUMMER - 2024 EXAMINATION MODEL ANSWER ‘ label id Password: ibleTxt()">Disable Text field b) Write a webpage that displays a form that contains an input for students rolino and names user is prompted to enter the input student rolino and name and rollno becomes value of the cookie. Note: Any other relevant logic shall be considered sheml> " + student.value + "sexpires=" 6M Create input text boxes for username and password display 2M Downloaded by Srkaccount (awej4stk@gmaicom) Page 20/30 MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) CISOAEC - 27001 - 2005 Certified) SUMMER - 2024 EXAMINATION MODEL ANSWER Subject: Client Side Scripting Language Subject Code: 22519
Enter your Roll No:
input type="Reset” value="Set C" type="button" onclick="writeCookie()"> Write a JavaScript to create rollover effect that involves text and 6M images. When the user book title, the corresponding book images appears Note: Any other relevant logic shall be considered stitle> rollovers sthead> table border="1" width="100%"> tr vali “top"> '50%"> Motivational book
6. Attempt any TWO of the following: 12 a) | Explain following form control / elements with example Button, 6M. Text, TextArea, Select, Checkbox, Form. Ans, | Note: Combined example including all controls / elements shall be | Explanation considered. eros Button is created by using following code: ore
‘There are several types of button, which are specified by the type attribute: 1. Button which corresponds to the graphic component. 2. Submit, which is associated to the form and which starts the loading of the file assigned to the action attribute. 3. Image button in which an image loaded from a file. A Button object also represents an HTML
occur, iii) Hiding JavaScript: action occurs in the JavaScript that is defined in the tag of document.addEventListener("contextmenu", function(e)

Right click on screen,Context Menu is disabled The preventDefault() method cancels the event if it is cancelable, meaning that the default action that belongs to the event will not ‘You can hide your JavaScript from a visitor by storing it in an external file on your web server. The external file should have the js file extension. The browser then calls the external file whenever the browser encounters a JavaScript element in the web page. If you look at the source code for the web page, you'll see reference to the extemal js file, but you won't see the source code for the JavaScript. The next example shows how to create and use an external JavaScript file, First you must tell the browser that the content of the JavaScript is located in an external file on the web server rather than built into the web page. You do this by assigning the file name that contains the JavaScript to the sre attribute of the

Right Click on screen, Context Menu is disabled mycode,js window.onload=function() ( document.addEventListener("contextmenu", function(e) { “javascript” type = "text / “ie docunnt is rae recharge on § studocu Downloaded by Sckaccount (awel4stk@gmailcom) epreventDefault(); }, false); } ©) _ | Develop a JavaScript to create rotating Banner Ads with URL OM links. Ans. | Note: Any other correct logic / program shall be considered ‘ Link Banner Ads noe ‘NumOfBanners) { layBanners()” > Page 30/30 Downloaded by Srkaccount ([email protected])

Potrebbero piacerti anche