ladybird0 / javascript Goto Github PK
View Code? Open in Web Editor NEWJavascript
Javascript
Email:
function myFunction(){
var fruits=["Banana","Orange","Apple","Mango"];
var x=document.getElementById("demo");
x.innerHTML=fruits.join();
}
function myFunction(){
var fruits=["Banana","Orange","Apple","Mango"];
var x=document.getElementById("demo");
x.innerHTML=fruits.join();
}
I am teaching myself how to work with APIs.
// Helper function to display JavaScript value on HTML page.
function showResponse(response) { var responseString = JSON.stringify(response, '', 2); document.getElementById('response').innerHTML += responseString; }
// Called automatically when JavaScript client library is loaded.
function onClientLoad() { gapi.client.load('youtube', 'v3', onYouTubeApiLoad); }
// Called automatically when YouTube API interface is loaded
function onYouTubeApiLoad() { // This API key is intended for use only in this lesson. // See https://goo.gl/PdPA1 to get a key for your own applications. gapi.client.setApiKey('AIzaSyCR5In4DZaTP6IEZQ0r1JceuvluJRzQNLE'); search(); }
// Use the JavaScript client library to create a search.list() API call.
function search() { var request = gapi.client.youtube.search.list({ part: 'id' }); // Send the request to the API server, // and invoke onSearchRepsonse() with the response. request.execute(onSearchResponse); }
// Called automatically with the response of the YouTube API request.
function onSearchResponse(response) { showResponse(response); }
The html file
`
<script src="search.js" type="text/javascript"></script>
<script src="https://apis.google.com/js/client.js?onload=onClientLoad" type="text/javascript"> </script>
window.onload=prepareLinks;
function prepareLinks(){
var links =document.getElementsByTagName("a");
for(var i=0;i<=links.length;i++){
if(links[i].getAttribute("class")=="popup"){
links[i].onclick=function(){
popUp(this.getAttribute("href"));
return false;
}
}
}
}
function popUp(winURL){
window.open(winURL,"popup","width=320,height=480");
}
Big: " + txt.big() + "
"); document.write("Small: " + txt.small() + "
"); document.write("Bold: " + txt.bold() + "
"); document.write("Italic: " + txt.italics() + "
"); document.write("Fixed: " + txt.fixed() + "
"); document.write("Strike: " + txt.strike() + "
"); document.write("Fontcolor: " + txt.fontcolor("green") + "
"); document.write("Fontsize: " + txt.fontsize(6) + "
"); document.write("Subscript: " + txt.sub() + "
"); document.write("Superscript: " + txt.sup() + "
"); document.write("Link: " + txt.link("http://www.w3schools.com") + "
"); document.write("Blink: " + txt.blink() + " (does not work in IE, Chrome, or Safari)
"); </script>A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.