JAVASCRIPT OBJECTS.docx - JAVASCRIPT OBJECTS JAVASCRIPT DATE OBJECT <html> <head><title>Date objects<\/title><\/head> <body background=\"images\/18

JAVASCRIPT OBJECTS.docx - JAVASCRIPT OBJECTS JAVASCRIPT...

This preview shows page 1 - 4 out of 13 pages.

JAVASCRIPT OBJECTS JAVASCRIPT DATE OBJECT <html> <head><title>Date objects</title></head> <body background="images/18.jpg" style="background-size:900px 600px;"> <h1><font color="#ff0000">Javascript Date Objects</font></h1> Current Date Object: <br><font color="red"><span id="dateobj"></span></font><br><br> getDate() returns date part of Date object.<br> Current Date : <font color="red"><span id="date"></span></font><br><br> getDay() returns weekday from Date object.<br> Current Weekday : <font color="red"><span id="weekday"></span></font><br><br> getFullYear() returns 4 digit year from Date object.<br> Current Year : <font color="red"><span id="year"></span></font><br><br> getHours() returns 24hour format hour value.<br> Current Hour : <font color="red"><span id="hour"></span></font><br><br> getMilliseconds() returns milliseconds.<br> Milliseconds : <font color="red"><span id="msecond"></span></font><br><br> getMinutes() returns minutes.<br> Current Minutes : <font color="red"><span id="minutes"></span></font><br><br> getMonth() returns month value from date object.<br> Current Month : <font color="red"><span id="month"></span></font><br><br> getSeconds() returns 24hour format hour value.<br> Current second : <font color="red"><span id="second"></span></font><br><br> getTime() returns 24hour format hour value.<br> Current milliseconds passed since 01/01/1970: <font color="red"><span id="time"></span></font><br><br> <script> var date = new Date(); document.getElementById('dateobj').innerHTML=date; document.getElementById('date').innerHTML=date.getDate(); document.getElementById('weekday').innerHTML=date.getDay(); document.getElementById('year').innerHTML=date.getFullYear(); document.getElementById('hour').innerHTML=date.getHours();
Image of page 1
document.getElementById('msecond').innerHTML=date.getMilliseconds(); document.getElementById('minutes').innerHTML=date.getMinutes(); document.getElementById('month').innerHTML=date.getMonth(); document.getElementById('second').innerHTML=date.getSeconds(); document.getElementById('time').innerHTML=date.getTime(); </script> </body> </html> Output :
Image of page 2
JAVASCRIPT STRING OBJECT <html> <head> <title>String object</title> </head> <body> <script language="javascript"> var name="Srinivasa Rao"; var age="20"; document.writeln("<h2>Javascript String Objects</h2>"); document.writeln("<br>Name is: <font color=red>"+name+"</font>"); document.writeln("<br>Age is: <font color=red>"+age+"</font>"); var a=name.charAt(3); document.writeln("<br>ChatAt result is: <font color=red>"+a+"</font>"); var b=name.concat(age,"thanks");
Image of page 3
Image of page 4

You've reached the end of your free preview.

Want to read all 13 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
Date objects<\/title><\/head>\n<body background=\"images\/18.jpg\" style=\"background-size:900px 600px;\"> <h1><font\ncolor=\"#ff0000\">Javascript Date Objects<\/font><\/h1> Current Date Object: <br><font c","type":"lab","course_id":10550569,"doc_date":"2019-05-15 02:03:10","filehash":"858091a80525ea7bd37a7f7de4628aa44cae575c","user_id":100000785368332,"pages":0,"username":"Chandoluphani","resource_url":"https:\/\/www.coursehero.com\/file\/41446137\/JAVASCRIPT-OBJECTSdocx\/"}, fileHash: "858091a80525ea7bd37a7f7de4628aa44cae575c", title: "JAVASCRIPT OBJECTS.docx", dbFilename: 41446137, } var _docLandingProps = { isLoggedIn: false, isNew: false, isDesktop: true, isPremier: false, hasUnlocks: false, unlocksRemaining: 0, unlockUrl: "/unlock-document/41446137/JAVASCRIPT-OBJECTSdocx/", mobileUxBucket: 0 } var _lockedDocumentMetadataProperties = { "pagesInSplit": 3, "splitIndex": 0, "splitHash": "3v0ks7", "identifiedQuestionTypes": [] } var _documentMetadataProperties = { "dbFilename": 41446137, "schoolName": "Acharya Nagarjuna University", "schoolId": 80605, "courseName": "Computer Science", "courseId": 7165646, "departmentName": "", "departmentId": 922453, "termName": "Summer", "termId": 4, "documentType": "lab", "pagesInDoc": 13 } var _documentSocialProofProperties = { "docViews": 9, "docConversions": 0, "docRatingCount": 0, "docRatingPercent": 0, "totalDocumentUnlocks": 0, "uploadUserUserType": "Student", "uploadUserId": "100000785368332" } </script> <script src='/assets/js/compiled/legacy/document/basic/chunk.vendors~legacy/document/basic/basic-doc-landing-app.02673af2f62d6d43b05d.js' type='text/javascript'></script><script src='/assets/js/compiled/legacy/document/basic/basic-doc-landing-app.965c53c66f710133147c.js' type='text/javascript'></script> <script src='/assets/js/compiled/legacy/document/express-unlock/chunk.vendors~legacy/document/express-unlock/app.9ecfa2bedbf03802d949.js' type='text/javascript'></script><script src='/assets/js/compiled/legacy/document/express-unlock/app.1c99b1ae47504c1d513a.js' type='text/javascript'></script> <script async type='text/javascript' src='/sym-assets/js/practice-problem-entry-point-index-7857588-47124fb.js'></script> <script type="text/javascript"> var frqBlocker = false; var showOutOfViewsBlocker = 0; var schoolId = 80605; var schoolName = "Acharya Nagarjuna University" ; // MCQ Answer Blurring AB Test Bucket 2 var startPage = 1; var canDisplayMcq = false; var mobileUxBucket = 0; var canDisplayQuestionMcq = false; var unlockUrl = "/unlock-document/41446137/JAVASCRIPT-OBJECTSdocx/"; var permissionType = "basic"; var endPage = 4; var dbFilename = 41446137; var routeFilename = "41446137"; if ($.lazyLoadXT) $.extend($.lazyLoadXT, { autoInit: false, srcAttr: 'data-null', selector: '' }); // For Mixpanel Tracking var contentType = 'document'; var dbFilename = 41446137; var similarQuestionId = 0; window.recentlyViewedDocuments = []; var tracker = new MixpanelEventTracking(); (function(m,p,n){ if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 && 'storage' in navigator && 'estimate' in navigator.storage) { navigator.storage.estimate().then(function(r){tracker.super_properties[m]=r.quota>Math.pow(2,20)*120?n:p}) } else if (/Safari/.test(navigator.userAgent)) { tracker.super_properties[m]=(function(){try{window.openDatabase(null,null,null,null);return 1}catch(e){return 0}})()?n:p } else if ("MozAppearance" in document.documentElement.style){ var x=indexedDB.open('x');x.onerror=function(){tracker.super_properties[m]=p},x.onsuccess=function(){tracker.super_properties[m]=n;} }})('Browser Mode','Private','Normal') tracker.super_properties['Page Name'] = 'Document - Basic'; tracker.super_properties['Reader View Enabled'] = 'No'; tracker.super_properties['Previews Left'] = 'Yes'; tracker.super_properties['Has Answered DQ'] = 0; var pageNum = 1; var endPage = 4; var course = {"school_name":"Acharya Nagarjuna University","prof_name":"","dept_acro":"CSE","term_string":"Summer","course_id":7165646,"canonical_course_id":7165646,"school_id":80605,"dept_id":922453,"course_num":"1111","year":2017,"term":4,"prof_id":1021477,"course_name":"Computer Science","verified":0,"professor":{"prof_id":1021477,"school_id":80605,"dept_id":0,"name":""},"resource_url":"https:\/\/www.coursehero.com\/sitemap\/schools\/80605-Acharya-Nagarjuna-University\/courses\/7165646-CSE1111\/"}; // IntersectionObserver may need to be loaded from polyfill.io. $(document).ready(function() { onScrollDirectionChangeWithElementVisible(document.getElementById('ch-footer'), function(direction) { if(direction == "down"){ $('.ch_basicDocPage_limitABContainer').addClass('limitAB_disappear').removeClass('limitAB_appear'); } else { $('.ch_basicDocPage_limitABContainer').removeClass('limitAB_disappear').addClass('limitAB_appear'); } }); }); // Adjust bookmark button positioning for mobile secondary splits $(document).ready(function () { //setup attributes for ga tracking $(".bdp_stickyHeader_action, .bdp_header_action, .bdp_roadblock_action, .bdp_viewDoc_action").attr('data-doc-landing-ga', 'Sign Up'); $("#ch-header").find("a").attr('data-doc-landing-ga', "Header"); $("#ch_breadcrumbs").find("a").attr('data-doc-landing-ga', "Breadcrumb"); $("#bdp_documentsAsideNarrow_bundle").find("a").attr('data-doc-landing-ga', "Side Related"); $(".ch_docs-related_bundle").find("a").attr('data-doc-landing-ga', "Bottom Related"); $(".ch_docInfo_container").find("a").attr('data-doc-landing-ga', "Doc Info"); $(".ch_appDownload_bundle").find("a").attr('data-doc-landing-ga', "App"); $(".ch_docSocialShare_bundle").find("a").attr('data-doc-landing-ga', "Social"); $(".ch-footer-links_container").find("a").attr('data-doc-landing-ga', "Footer"); }); // set page num change to only occur after scroll from 1st page var pageScrolls = 0; // IntersectionObserver may need to be loaded from polyfill.io. $(document).ready(function() { var el = document.getElementsByClassName('bdp_preview_single')[0]; if (!el) return; onScrollDirectionChangeWithElementVisible(el, function(direction) { if (direction === 'up' && pageNum > 1) { pageNum--; } else if (direction === 'down' && pageScrolls > 0 && pageNum < endPage) { pageScrolls++; pageNum++; } else if (direction === 'down' && pageScrolls < 1) { pageScrolls = 1; } $('.greenText').text(pageNum); }); }); $("#view-more-related").on('click', function () { tracker.track("View More Button Click", {"Type": "Doc"}); }); $("[data-ch-mixpanel-doc-thumb-tracking]").on('click', function (event) { var document_number = jQuery(event.delegateTarget).attr('data-ch-mixpanel-doc-thumb-tracking'); var location = jQuery(event.delegateTarget).attr('data-ch-mixpanel-doc-location'); var algorithm = jQuery(event.delegateTarget).attr('data-ch-mixpanel-doc-algorithm'); if (document_number) { var properties = {}; properties['Document Number'] = document_number; properties['Location'] = location; properties['Algorithm'] = algorithm; tracker.track("Doc Landing Related Content Clicks", properties); } }); function getUserId() { return -1; } // MCQ CTA amplitude tracking $(document).on('click', '.mcq_subscribe_action', function (e) { var properties = {}; var conversionName = e.currentTarget.getAttribute('data-ch-mixpanel-conversion-tracking'); if (conversionName) { properties['Conversion Name'] = conversionName; tracker.track('Conversion Action', properties); } }); // Amplitude user properties var userProperties = {}; userProperties['DQ AB Test'] = 0; tracker.setUserProperties(-1, userProperties); window.isPremierDocPage = false; var department = null; department = "CSE"; $("#doc_link_expired_close_btn").on('click', function (e) { e.preventDefault(); $(".doc_link_expired").hide(); }); $("#show_more_endorse_info_btn").on('click', function () { $("#endorsed_by_info").toggle(); }); CHAnalytics.setPagePrefix("logged_out_doc_"); CHAnalytics.setPageDefaultActionTargetType("document"); //commenting out in case we ever want to show the Intercom or question widget again var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0; var ctrlKey = isMac ? "metaKey" : "ctrlKey"; $(document).ready(function(){ $(window).on('keydown', function(event) { if (!(event.which === 70 && event[ctrlKey])) return true; tracker.track("Browser On Page Search", {}); return true; }); }); </script> <script type="text/javascript"> window.addEventListener("load", function() { $('link[media=none]').each(function(_, link) { link.media = 'screen' }) }) </script> <script type="text/javascript"> CHAnalytics.v("initial").pageView() </script> <script type="text/javascript">window['_props_otherRelatedMaterials'] = {"documents":[],"isListLayout":false,"showSolvedLabel":false,"location":"bottom"}</script> <script type="text/javascript">window['_props_otherRelatedMaterials_router'] = {}</script><script type="text/javascript">window['_props_sidebar'] = {"documents":[],"isListLayout":false,"showSolvedLabel":false,"location":"left_sidebar"}</script> <script type="text/javascript">window['_props_sidebar_router'] = {}</script><script type="text/javascript" src="/ch-assets/ssi/vendors~b16a1c34cd91ad2946b467988ca0a3afecc0f52c.js"></script><script type="text/javascript" src="/ch-assets/ssi/common~b16a1c34cd91ad2946b467988ca0a3afecc0f52c.js"></script><script type="text/javascript" src="/ch-assets/ssi/38e61dab4d9e166c4952f96c29d667c2adc14cf6.all.bundle.js"></script><script async type="text/javascript" src="/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=1&cb=1254262162"></script> </body> </html>