Get List of Document Properties Accessible Using W3C DOM

Ramu Prasad
Updated on 23-Jun-2020 07:06:10

234 Views

The following are the document properties which can be accessed using W3C DOM −Sr.NoProperty & Description1BodyA reference to the Element object that represents the tag of this document.Ex − document.body2DefaultViewIts Read-only property and represents the window in which the document is displayed.Ex − document.defaultView3DocumentElementA read-only reference to the tag of the document.Ex − document.documentElement8/31/20084ImplementationIt is a read-only property and represents the DOMImplementation object that represents the implementation that created this document.Ex − document.implementation

Month M M Format Specifier in C#

Arjun Thakur
Updated on 23-Jun-2020 07:05:26

353 Views

The Month standard format specifier represents a custom date and time format string.The format string is defined by the current DateTimeFormatInfo.MonthDayPattern property.The custom format string −MMMM ddExample Live Demousing System; using System.Globalization; class Demo {    static void Main() {       DateTime date = new DateTime(2018, 6, 11, 9, 15, 0);       Console.WriteLine(date.ToString("m", CultureInfo.CreateSpecificCulture("en-us")));    } }OutputJune 11

Collection Initialization in C#

Ankith Reddy
Updated on 23-Jun-2020 07:04:32

887 Views

Initialize Collection like class objects using collection initializer syntax.Firstly, set values for the Employee object −var emp1 = new Employee() { EID = 001, EmpName = "Tim", EmpDept = "Finance"}; var emp2 = new Employee() { EID = 002, EmpName = "Tom", EmpDept = "HR"};Now add this under a collection.IList empDetails = new List {emp1, emp2 };Let us see the complete code −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main() {       var emp1 = new Employee() { EID = 001, EmpName = "Tim", EmpDept = "Finance"};       var emp2 ... Read More

Turn On Error Information in Your Web Browser

Nishtha Thakur
Updated on 23-Jun-2020 07:04:14

372 Views

The most basic way to track down errors is by turning on error information in your browser. By default, Internet Explorer shows an error icon in the status bar when an error occurs on the page.Double-clicking this icon takes you to a dialog box showing information about the specific error that occurred.Since this icon is easy to overlook, Internet Explorer gives you the option to automatically show the Error dialog box whenever an error occurs.To enable this option, select Tools → Internet Options → Advanced tab. and then finally check the "Display a Notification About Every Script Error" box option ... Read More

Short Time 't' Format Specifier in C#

Samual Sam
Updated on 23-Jun-2020 07:03:57

473 Views

The Short Time format specifier represents a custom date and time format string.It is defined by the current DateTimeFormatInfo.ShortTimePattern property.For example, the custom format string is −HH:mmExample Live Demousing System; using System.Globalization; class Demo {    static void Main() {       DateTime date = new DateTime(2018, 5, 4, 10, 12, 10);       Console.WriteLine(date.ToString("t", CultureInfo.CreateSpecificCulture("en-us")));    } }Output10:12 AM

Reduce the Number of Errors in Scripts

Ramu Prasad
Updated on 23-Jun-2020 07:03:36

247 Views

To reduce the number of errors in scripts, follow the below-given tips −Use plenty of comments. Comments enable you to explain why you wrote the script the way you did and to explain particularly difficult sections of code.Always use indentation to make your code easy to read. Indenting statements also make it easier for you to match up the beginning and ending tags, curly braces, and other HTML and script elements.Write modular code. Whenever possible, group your statements into functions. Functions let you group related statements, and test and reuse portions of code with minimal effort.Be consistent in the way you ... Read More

Action Delegate in C#

George John
Updated on 23-Jun-2020 07:03:31

266 Views

Action delegate does not return a value and can be used with a method that has a void return type.Declare Action Delegate.Action del = Display;Here is our method −public static void Display(int val) {    Console.WriteLine(val); }Now call the method with a value.Example Live Demousing System; public class Demo {    public static void Main() {       Action del = Display;       del(2);    }    public static void Display(int val) {       Console.WriteLine(val);    } }Output2

Multiple Where Clause in C# LINQ

karthikeya Boyini
Updated on 23-Jun-2020 07:02:56

4K+ Views

Filter collections using Where clause in C#. A single query expression may have multiple where clauses.Firstly, set a collection −IList employee = new List() {    new Employee() { EmpID = 1, EmpName = "Tom", EmpMarks = 90, Rank = 8} ,    new Employee() { EmpID = 2, EmpName = "Anne", EmpMarks = 60, Rank = 21 } ,    new Employee() { EmpID = 3, EmpName = "Jack", EmpMarks = 76, Rank = 18 } ,    new Employee() { EmpID = 4, EmpName = "Amy" , EmpMarks = 67, Rank = 20} , };Now, let’s use multiple ... Read More

Different Navigator Properties for Web Pages

Daniol Thomas
Updated on 23-Jun-2020 07:02:17

179 Views

can use several Navigator related properties in your Web page. The following are the properties −Sr.NoProperty & Description1appCodeNameThis property is a string that contains the code name of the browser, Netscape for Netscape and Microsoft Internet Explorer for Internet Explorer.2appVersionThis property is a string that contains the version of the browser as well as other useful information such as its language and compatibility.3languageThis property contains the two-letter abbreviation for the language that is used by the browser. Netscape only.4mimTypes[]This property is an array that contains all MIME types supported by the client. Netscape only.5platform[]This property is a string that contains ... Read More

Find Web Browser Name and Version with JavaScript

Abhinaya
Updated on 23-Jun-2020 07:01:42

332 Views

To find the name of the web browser, with version, you need to try the following code −Example           Browser Detection Example                                  

Advertisements