\n\n\n26\n27\n\n28\n29▾\n\n30▾\n
\n31▾>\n32 ▾\n33 ▼\n34\n35\n36\n37▾\n38\n39\n40▾\n41\n42\n
\n\n\n\n\n\n\n\n\n\n\n43▾\n44\n45\n46 ▼\n47\n48\n\n\n\n\n\n\n\n\n\n\n49 ▼\n50\n51\n52\n

Your Movie for Tonight is:

Genre:

Year:

Rated:

Runtime:

\n53\n
\n54\n
\n55\n56\n\n57\n\n58","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"حل مفصل خطوة بخطوة من معلم معتمد — متاح للمشتركين في أرشيف الأسئلة."}}}
quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryبرمجة وتطوير البرمجيات schoolبكالوريوس event_available2026-07-14

السؤال

Transcribed Image Text:

// converts a json file from a url to an array var xmlhttp = new XMLHttpRequest(); var url = "http://movieroulette.net/movieArray.json"; 5 ▼ xmlhttp.onreadystatechange = function() { 6▾ 123456789012345 14 16 }; if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var theArray = JSON.parse(xmlhttp.responseText); getRandomMovie (theArray); } xmlhttp.open("GET", url, true); xmlhttp.send(); // Picks a movie from the array. 17 ▾ function getRandomMovie (theArray) { 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 var randNum; var htmlArray = ""; var imgArray = ""; randNum = Math.floor(Math.random() * arr.length); if (randNum < 0) randNum = 0; if (randNum >= arr.length) randNum arr.length - 1; htmlArray += "Want to Learn More? <a href="+arr[randNum].link+" title="+arr[rand Num].title+">CLICK HERE!</a>"; imgArray += '<img src="images/"+rand Num+.jpg">`; document.getElementById("arrName").innerHTML = arr[randNum].name; document.getElementById("arrGenre").innerHTML = arr[randNum].genre; document.getElementById("arrYear").innerHTML = arr[randNum]. year; document.getElementById("arrRating").innerHTML = arr[randNum].rating; document.getElementById("arrRuntime").innerHTML = arr[rand Num].runtime; document.getElementById("arrURL").innerHTML = htmlArray; document.getElementById("arrImg").innerHTML = imgArray; 40 41 سے } 42 43 44 1 <!DOCTYPE html> 2 ▼ <html> <head> <title>Movie Roulette</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <style> @import url('https://fonts.googleapis.com/css?family=Concert+One'); </style> <style type="text/css"> div#mydivision{ font-family: 'Concert One', cursive; margin: 0; position: absolute; top: 50%; left: 50%; margin-right: -50%; transform: translate (-50%, -50%); padding-top: 0%; 3 ▼ 4 5 6 ▾ 7 8 9 ▼ 10 ▼ 11 12 13 14 15 16 17 18 19 } 20▾> img{ 21 padding-right: 30px; 22 height: 390px; 23 width: 260px; 24 } 25 </style> 26 27 </head> 28 29▾ <body> 30▾ <center> 31▾> 32 ▾ 33 ▼ 34 35 36 37▾ 38 39 40▾ 41 42 <div id="mydivision"> <table border="0"> <tr> <th rowspan="6"> <div id="arrImg"> </div> </th> <td><h1>Your Movie for Tonight is: <font color="red"> <div id="arrName"></div> </font></h1></td> </tr> <tr> <td><h2>Genre: <font color="red"><span id="arrGenre"></span></font></h2></td> </tr> <tr> <td><h2>Year: <font color="red"><span id="arrYear"></span></font></h2></td> 43▾ 44 45 46 ▼ 47 48 </tr> <tr> <td><h2>Rated: <font color="red"><span id="arrRating"> </span></font></h2></td> </tr> <tr> <td><h2>Runtime: <font color="red"><span id="arrRuntime"></span></font></h2></td> </tr> <tr> <td><h2><span id="arrURL"></span></h2></td> </tr> 49 ▼ 50 51 52 </table> 53 </div> 54 </center> 55 56 </body> 57 </html> 58

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top