Hi,

Is it possible to download the javascript API documentation,and to use it without internet connection?.can you help me please where to download the api and how to use this without using internet.just like in java api i downloaded it and use it without the internet connection.

Thank you in advance.

Member Avatar for stbuchok

JavaScript is built into the browser. You don't need an internet connection to use it, you just need a browser.

If you want to put JavaScript into another application, you could look at the V8 JavaScript Engine

JavaScript is built into the browser. You don't need an internet connection to use it, you just need a browser.

If you want to put JavaScript into another application, you could look at the V8 JavaScript Engine

Hi Thank you for the reply,but how can i see the API?...like to see what are the classes the methods..

Member Avatar for stbuchok

Copy and paste the code below into an HTML document and then load in whatever browser you are using:

<html>

<head>

<style>

.link
{
	cursor: pointer;
}

</style>

</head>

<body>

<ul>
	<li id="topListItem" class="link"><b onclick="getListOfProperties(document.getElementById('topListItem'), window); return false;">window/document</b></li>
</ul>

<script>

var i = 0;

function getListOfProperties(element, obj){
 	var childList = '<ul>';

 	for(var prop in obj){
 		i++;

		var listItemName = 'item' + i;

		try
		{
		 	if(obj[prop] instanceof Function){
				childList += '<li>(function) ' + prop + '</li>';
			}else if(obj[prop] instanceof Object){
				childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(object) ' + prop + '</b></li>';
			}else if(obj[prop] instanceof Array){
				childList += '<li>(array) ' + prop + '</li>';
			}else if(typeof obj[prop] === 'number'){
				childList += '<li>(number) ' + prop + '</li>';
			}else if(typeof obj[prop] === 'string'){
				childList += '<li>(string) ' + prop + '</li>';
			}else if(typeof obj[prop] === 'object'){
				if(prop.substring(0,2) === 'on'){
					childList += '<li>(event) ' + prop + '</li>';
				}
				else{
					childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(object) ' + prop + '</b></li>';
				}
			}else if(typeof obj[prop] === 'boolean'){
				childList += '<li>(boolean) ' + prop + '</li>';
			}else{
				childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(not sure) ' + prop + '</b></li>';
			}
		}
		catch(error)
		{
			childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(error) ' + prop + '</b></li>';
		}
 	}

 	childList += '</ul>';

 	element.innerHTML += childList;
}


</script>

</body>

</html>

This won't give you an explanation as to what the object or property does, but it should help you out.

Otherwise you will need to read books, and go to sites like w3schools to get some basic information. Hopefully someone else can give some good resources as well.

Copy and paste the code below into an HTML document and then load in whatever browser you are using:

<html>

<head>

<style>

.link
{
	cursor: pointer;
}

</style>

</head>

<body>

<ul>
	<li id="topListItem" class="link"><b onclick="getListOfProperties(document.getElementById('topListItem'), window); return false;">window/document</b></li>
</ul>

<script>

var i = 0;

function getListOfProperties(element, obj){
 	var childList = '<ul>';

 	for(var prop in obj){
 		i++;

		var listItemName = 'item' + i;

		try
		{
		 	if(obj[prop] instanceof Function){
				childList += '<li>(function) ' + prop + '</li>';
			}else if(obj[prop] instanceof Object){
				childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(object) ' + prop + '</b></li>';
			}else if(obj[prop] instanceof Array){
				childList += '<li>(array) ' + prop + '</li>';
			}else if(typeof obj[prop] === 'number'){
				childList += '<li>(number) ' + prop + '</li>';
			}else if(typeof obj[prop] === 'string'){
				childList += '<li>(string) ' + prop + '</li>';
			}else if(typeof obj[prop] === 'object'){
				if(prop.substring(0,2) === 'on'){
					childList += '<li>(event) ' + prop + '</li>';
				}
				else{
					childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(object) ' + prop + '</b></li>';
				}
			}else if(typeof obj[prop] === 'boolean'){
				childList += '<li>(boolean) ' + prop + '</li>';
			}else{
				childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(not sure) ' + prop + '</b></li>';
			}
		}
		catch(error)
		{
			childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(error) ' + prop + '</b></li>';
		}
 	}

 	childList += '</ul>';

 	element.innerHTML += childList;
}


</script>

</body>

</html>

This won't give you an explanation as to what the object or property does, but it should help you out.

Otherwise you will need to read books, and go to sites like w3schools to get some basic information. Hopefully someone else can give some good resources as well.

HI,

Thank you for the reply...okay i will try to visit w3school.thank you again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.