Create your own website • A website of at least 5 individual web pages • A topic
ID: 2246808 • Letter: C
Question
Create your own website
• A website of at least 5 individual web pages
• A topic of your choice… As long as the topic involves ONE of the following
E-waste Disposal/Recycling
Microprocessors
Batteries
Displays/ Lamps
Circuit boards
Wires
Skins and cases
• The Website must have:
A title on every page
A Large Heading that will act as a title and appear at the top of every page
You don’t have to use a h1 tag
Words on every page in addition to the title and heading
A unique favicon for your site that displays on every page
All pages must be in theme
No pages that are just stuff we did in class or for homework
At least 1 external style sheet
Every page must be styled with the style sheet
At least 1 external file to run Javascript
A link from every page to every other page on the website
Must style the links with CSS no unstyled links
Must remove underline
Must have the style of the link change with a mouse over event
---- - -- - - -- Javascript or CSS
A dropdown “menu” of some type
Doesn’t have to contain links just some information is fine
Must code yourself – can’t be a widget from the internet or from a program that
generates it
May use CSS or Javascript
Images on every page – they may be taken from the internet
A form with a submit button
The information must be read by the Javascript file
A minimum of 2 items in the form that get information
Text input
Radio button etc.
Draggable objects on one of the pages (only 2 needed)
Collect and displaying cookie information
Make use of cookies. Read information from the page or from user
Display information back on the page in an HTML tag
Use innerHTML functionality
Explanation / Answer
Hi,,,,,,,
[NoInterfaceObject]
interface BatteryManager : EventTarget {
readonly attribute boolean charging;
readonly attribute double chargingTime;
readonly attribute double dischargingTime;
readonly attribute double level;
[TreatNonCallableAsNull]
attribute Function? onchargingchange;
[TreatNonCallableAsNull]
attribute Function? onchargingtimechange;
[TreatNonCallableAsNull]
attribute Function? ondischargingtimechange;
[TreatNonCallableAsNull]
attribute Function? onlevelchange;
<div id="box">
<div id="battery"></div>
<div id="text">
<span><strong>Battery
specifications</strong></span>
<span id="level">Battery level: unknown</span>
<span id="status">Charging status: unknown</span>
<span id="charged">Battery charged: unknown</span>
</div>
</div>
// get the battery information
var battery = navigator.battery || navigator.webkitBattery || navigator.mozBattery;
// get the battery information to be displayed
$('#level').text("Battery level: " + Math.round(battery.level * 100) + "%");
$('#status').text("Charging status: " + ((battery.charging) ? "true" : "false"));
if (battery.charging) {
$('#charged').text("Battery time to charge: " + battery.chargingTime);
} else {
$('#charged').text("Battery time left: " + (Math.round(battery.dischargingTime / 60)) + " minutes");
}
var b = new Battery("assets/bat_empty.png", "assets/bat_full.png", 96, 168);
$("#battery").append(b.domElement);
b.updateBattery(battery.level * 100);
// when the loader is connected
battery.addEventListener("chargingchange", function (e) {
$('#status').text("Charging status: " + ((battery.charging) ? "true" : "false"));
}, false);
// when charging time changes update the time to charge / time left
battery.addEventListener("chargingtimechange", function (e) {
if (battery.charging) {
$('#charged').text("Battery time to charge: " + battery.chargingTime);
} else {
$('#charged').text("Battery time left: " + (Math.round(battery.dischargingTime / 60)) + " minutes");
}
}, false);
// when dischargingtime changes update the time to charge / time left
battery.addEventListener("dischargingtimechange", function (e) {
if (battery.charging) {
$('#charged').text("Battery time to charge: " + (Math.round(battery.dischargingTime / 60)) + " minutes");
} else {
$('#charged').text("Battery time left: " + (Math.round(battery.dischargingTime / 60)) + " minutes");
}
}, false);
// listener that is notified when the level changes
battery.addEventListener("levelchange", function (e) {
$('#level')
.text("Battery level: " + Math.round(battery.level * 100) + "%");
b.updateBattery(100 * battery.level)
}, false);
};
Thanks
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.