Commit 0fe9ca48 by Trevor Austin

Resolve merge conflict

parents 8f03b121 a74b9e0f
scp -i ~/.ssh/mpcs52553-2.pem -r examples/* ec2-user@uchicagowebdev.com:/var/www/html
scp -i ~/.ssh/mpcs52553-2.pem -r exercise_4/* ec2-user@uchicagowebdev.com:/var/www/html
scp -r examples/* ec2-user@uchicagowebdev.com:/var/www/html/week_4/examples/
scp -r exercise_4/* ec2-user@uchicagowebdev.com:/var/www/html/week_4/exercise/
<html>
<head>
<title>DOM Manipulation</title>
</head>
<body>
<div id="testing_ground">Watch me change colors!</div>
<input type="button" onclick="recolor('testing_ground')" value="Colorize!"></input>
<ol id="mylist">
</ol>
<input id="imageurl"></input>
<button onclick="addListItem();">Add Image</button>
<script>
function recolor(id) {
var e = document.body.querySelector("#"+id);
e.setAttribute("style","color: red");
}
function addListItem() {
var list = document.body.querySelector("#mylist");
var li = document.createElement("li");
var img = document.createElement("img");
var url = document.body.querySelector("#imageurl").value;
img.setAttribute("src", url);
li.appendChild(img);
list.appendChild(li);
}
</script>
</body>
<html>
<head>
<title>Increment Counter</title>
</head>
<body>
<script>
var i=0;
function increment() {
i = i+1;
console.log(i);
}
</script>
<button onclick="increment();">Incrementalizer!</button>
</body>
......@@ -25,11 +25,7 @@ but feel free to use any you find useful.
Once the user has started a search, use an API to suggest related searches they
could run too. Make the results clickable, such that clicking them runs the
suggested search. Microsoft offers a straightforward
[Search Suggestion API](https://concept.research.microsoft.com/Home/API), and
Google has a
[query.suggest](https://developers.google.com/cloud-search/docs/reference/rest/v1/query/suggest)
API, but feel free to use any you find useful.
suggested search. Microsoft offers a straightforward [Search Suggestion API](https://www.microsoft.com/en-us/bing/apis/bing-autosuggest-api), but feel free to use any you find useful.
Use your judgment to make a functional and visually appealing page. You may want
to consider using some of the advanced layouts we learned in Week 2 to fit the
......
......@@ -87,8 +87,8 @@ needed to send the data to the server in order to give feedback.
- onfocus
## Examples
- [Alert Example](http://uchicagowebdev.com/alert.html)
- [Console Log Example](http://uchicagowebdev.com/console.html)
- [Alert Example](http://uchicagowebdev.com/week_4/examples/alert.html)
- [Console Log Example](http://uchicagowebdev.com/week_4/examples/console.html)
---
# Lab: Logging events to the Console
......@@ -118,7 +118,7 @@ function increment() {
```
<div id="testing_ground">Watch me change colors!</div>
<input type="button" onclick="recolor(testing_ground)" value="Colorize!"></input>
<input type="button" onclick="recolor('testing_ground')" value="Colorize!"></input>
<script>
function recolor(id) {
......@@ -126,8 +126,6 @@ function recolor(id) {
e.setAttribute("style","color: red");
}
</script>
```
---
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment