- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
The Uri.CheckSchemeName() method in C# is used to determine whether the specified scheme name is valid.syntaxFollowing is the syntax −public static bool CheckSchemeName (string schemeName);Above, the parameter scheme name is the scheme name to validate.ExampleLet us now see an example to implement the Uri.CheckSchemeName() method −using System; public class Demo { public static void Main(){ Uri newURI = new Uri("https://www.tutorialspoint.com"); Console.WriteLine("URI = "+newURI); string schemeName = newURI.Scheme; if(Uri.CheckSchemeName(schemeName)) Console.WriteLine("Valid: Scheme name"); else Console.WriteLine("Invalid: Scheme name"); ... Read More
The Uri.CheckHostName() method in C# is used to determine whether the specified hostname is a valid DNS name.SyntaxFollowing is the syntax −public static UriHostNameType CheckHostName (string host_name);ExampleLet us now see an example to implement the Uri.CheckHostName() method −using System; public class Demo { public static void Main(){ string strURI = "http://localhost"; Console.WriteLine("URI = "+strURI); UriHostNameType res = Uri.CheckHostName(strURI); Console.WriteLine("Host type = "+res); } }OutputThis will produce the following output −URI = http://localhost Host type = UnknownExampleLet us now see another example to implement the Uri.CheckHostName() method ... Read More
The UInt64.ToString() method in C# is used to convert the numeric value of the current UInt64 instance to its equivalent string representation.SyntaxFollowing is the syntax −public override string ToString();ExampleLet us now see an example to implement the UInt64.ToString() method −using System; public class Demo { public static void Main(){ ulong val1 = 465656665; ulong val2 = 232525678; Console.WriteLine("Value1 (String representation) = "+val1.ToString()); Console.WriteLine("Value2 (String representation) = "+val2.ToString()); bool res = val1.Equals(val2); Console.WriteLine("Return value (comparison) = "+res); if (res) ... Read More
The focusout() method in jQuery occurs when an element loses focus.SyntaxThe syntax is as follows −$(selector).focusout(function)ExampleLet us now see an example to implement the jQuery focusout() method − .demo { color: blue; } $(document).ready(function(){ $("input").focusin(function(){ $("p").html("focusin event triggered"); }); $("input").focusout(function(){ $("p").html("focusout event triggered"); }); }); Student Details Student Name: OutputThis will produce the following output −Now, click inside to get focus −Click outside to lose focus −
The addClass() method in jQuery is used to add one or more class names to the selected elements.ExampleLet us now see an example to implement the jQuery addClass() method − .demo * { display: block; border: 3px dashed red; padding: 3px; margin: 25px; } .one { border: 2px solid yellow; } $(document).ready(function(){ $("span.test").next().addClass("one"); }); Heading One This is our demo text in div. child grandchild grandchild grandchild ... Read More
The finish() method in jQuery is used to stop the currently-running animations. It removes all queued animations and completes all animations for the selected elements.SyntaxThe syntax is as follows −$(selector).finish(queue)Above, the queue parameter is the name of the queue to stop animation.ExampleLet us now see an example to implement the jQuery finish() method − div { background:orange; height:200px; width:200px; padding: 5px; } $(document).ready(function(){ $("#begin").click(function(){ $("div").animate({height: 450}, 2000); }); ... Read More
The focusin() method in jQuery occurs when an element gets focus.SyntaxThe syntax is as follows −$(selector).focusin(function)ExampleLet us now see an example to implement the jQuery focusin() method − .demo { color: blue; } $(document).ready(function(){ $("input").focusin(function(){ $("p").html("focusin event triggered"); }); $("input").focusout(function(){ $("p").html("focusout event triggered"); }); }); Student Details Student Name: OutputThis will produce the following output −Now, click inside to get focus −Click outside to lose focus −
The blur() method in jQuery is used to trigger the blur event, whereas the blur event occurs when an element loses focus.SyntaxThe syntax is as follows −$(selector).blur()ExampleLet us now see an example to implement the jQuery blur() method − .demo { color: blue; } $(document).ready(function(){ $("#btn").click(function(){ $("input").blur(); $("p").html("blur event triggered"); }); }); Student Details Student Name: Student Address: Trigger Event OutputThis will produce the following output −Click on the “Trigger Event” above −
The click() method in jQuery is used to initiate the click event or attach a function to run when a click event occurs.SyntaxThe syntax is as follows −$(selector).click(function);ExampleLet us now see an example to implement the jQuery click() method − $(document).ready(function(){ $(document).ready(function() { $("p").click(function() { alert('Paragraph clicked!') }); }); }); Demo Heading This is a paragraph. OutputThis will produce the following output −Now, click on the paragraph and an alert box will generate −
The focus() method in jQuery is used to trigger the focus event. The focus event occurs when an element gets focus.SyntaxThe syntax is as follows −$(selector).focus()ExampleLet us now see an example to implement the jQuery focus() method − .demo { color: blue; } $(document).ready(function(){ $("#btn").click(function(){ $("input").focus(); $("p").html("focus event triggered"); }); }); Student Details Student Name: Trigger Event OutputThis will produce the following output −Above, click “Trigger Event” to trigger the focus event −