.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> JQuery >> Post New Question Subscribe to Interview Questions

What is difference between body onload() function and document.ready() function in jQuery?

Posted By :abhays     Posted Date :August 15, 2014    Points :40   Category :JQuery 
Difference between body onload() functi and document.ready() function in jQuery is as below

1. We can have more than one document.ready() function in a page where as we can have only one onload function.
2. Document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page.

You can also find related Interview Question to What is difference between body onload() function and document.ready() function in jQuery?  below: 

How is body onload() function is different from document.ready() function used in jQuery?

  
Document.ready() function is different from body onload() function because off 2 reasons.

1. We can have more than one document.ready() function in a page where we can have only one onload function.
2. Document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page. (More...)

How is body onload() function different from document.ready() function used in Jquery?

  
Document.ready() function is different from body onload() function because off 2 reasons:
1. We can have more than one document.ready() function in a page where we can have only one onload function.
2. Document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page. (More...)

Can we have multiple document.ready() function on the same page?

  
YES. We can have any number of document.ready() function on the same page. (More...)

Difference between a sub and a function.

  
A Sub Procedure is a method will not return a value
-A sub procedure will be defined with a "Sub" keyword
Sub ShowName(ByVal myName As String)
Console.WriteLine("My name is: " & myName)
End Sub
-A function is a method that will return value(s).
-A function will be defined with a "Function" keyword
Function FindSum(ByVal num1 As Integer, ByVal num2 As Integer) As Integer
Dim sum As Integer = num1 + num2
Return sum
End Function (More...)

whats the difference between a stroed procedure and a user defined function

  
udf ll return only one output parameter where as sp returns more(2100 not sure)

udf are called directly by their name in a pgm where as exec spname
is used to execcute an sp (More...)

Main Difference between Method and function?

  
Method which tied to a class where as function need not to be. In OOPS we can say there is no functions concept because all the method is tied to a class.

Function is available in procedural language, Scripting language that why we say JavaScript function etc. (More...)

Difference between Function and Stored Procedure?

  
UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as Stored procedures cannot be.
UDFs that return tables can be treated as another rowset. This can be used in JOINs with other tables.
Inline UDF's can be though of as views that take parameters and can be used in JOINs and other Rowset operations.
(More...)

Difference between Len and DataLength function in Sql Server?

  
LEN() function will not count the trailing spaces.

DATALENGTH() function will count the trailing function

example:

DECLARE @MyString VARCHAR(50)
SET @MyString = 'alwyn '
SELECT LEN(@MyString) AS LenFunction
SELECT DATALENGTH(@MyString) AS DataLength

LenFunction:
5

DataLength:
8 (More...)

What is Difference between Function and Stored Procedure?

  
UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as Stored procedures cannot be. UDFs that return tables can be treated as another rowset. This can be used in JOINs with other tables. Inline UDF's can be thought of as views that take parameters and can be used in JOINs and other Rowset operations. (More...)

What is the basic used of jQuery() function

  
->Establish code to be executed when the DOM is ready for manipulation.
->Help as a namespace for global utility functions.
->Create DOM elements from HTML markup.
->Select and wrap DOM elements to operate upon (More...)

Difference between Store Procedure and function?

  
S.No Store Procedure Function
1. Return Null or Value Return Value
2. Input,OutPut Parameter Input Parameter
3. Call independently Call SQL Statement
4. Not called from Function Called from Procedure (More...)

Database: Difference between Function and stored procedure?

  

Function can be used in sql statements anywhere in where/select/having etc. where as stored procedure cannot be.
(More...)

What is the Difference between subroutine and function In VB Script

  
Function Should Return a Value

Subroutine does not return any Value (More...)

Difference between stored procedure and function

  

1.Function must return a value but Stored Procedure can return 0(Zero) or n values
2.Functions have only input parameters but Procedures can have either input or output or both parameters .
3.Function must have one input parameter which is mandatory but 4.Stored Procedure may take 0 (Zero) to n input parameters.
5.Functions can be called from Procedure whereas Procedures cannot be called from Function.
6.Procedure contains DML statement whereas function allows only select statement.
6.Exception handling can be done in stored Procedure only (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend