When a html doctor is placed in the head or body section, these scripts write the document immediately. How can I tell their functionality with a button in the document? I have tried all the usual methods of calling the JS function, but there is no work please help, many thanks.
& lt; Script & gt; Var callback function = function (data1) {var windy = data1.query.results.channel.wind; //alert(windy.chill); Document.write ("wind chill factor:" + windy.chill); }; & Lt; / Script & gt; & Lt; Script src = "https://query.yahooapis.com/v1/public/yql?q=select * weather.forecast Where is bad (Choose from geographical location woid.places (1) where text = 'chicago, il' ) & Amp; Format = json & amp; Callback = callbackFunction "& gt; & Lt; / Script & gt;
Look at this code I get the air cooled and store it in a variable again , I use the AuxView attribute of a button to insert that value into a single device. Does this help?
& lt; Script & gt; Vir vauchil; Var callback function = function (data) {var wind = data.query.results.channel.wind; Wind_chill = wind.chill; }; Function get_wind_chill () {document.getElementById ('wind_chill'). InnerHTML = "Wind Refrigerant:" + wind_chill; } & Lt; / Script & gt; & Lt; Select the script from the field (1) where text = 'Chicago, IL') & nbsp; script src = "https://query.yahooapis.com/v1/public/yql?q=When Weather is Brown Amp; format = json & amp; callback = callbackFunction "& gt; & Lt; / Script & gt; & Lt; Div id = "wind_chill" & gt; & Lt; / Div & gt; & Lt; Input type = "button" onclick = "get_wind_chill ();" Note: When the page loads, it cools down the air. If you click the button every time (without reloading a page) you need to cool off a new air, you will need to modify the above code.
No comments:
Post a Comment