0

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.

2
Contributors
4
Replies
6
Views
5 Years
Discussion Span
Last Post by jemz
0

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

0

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..

0

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.

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.