This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
@@ -103,7 +103,18 @@
|
||||
// 1. Füge in der Liste der Product Specifications mithilfe von JavaScript folgenden Listenpunkt hinzu:
|
||||
// Capacity: 11 oz.
|
||||
|
||||
const newItem = document.createElement('li');
|
||||
newItem.textContent = 'Capacity: 11 oz.';
|
||||
const listProductSpecification = $('#product_specification');
|
||||
listProductSpecification.append(newItem);
|
||||
|
||||
// 2. Erweitere die Select-Box neben dem buy-Button mithilfe von JavaScript um den Eintrag: 5 items.
|
||||
|
||||
const formBuy = $('#buy_form');
|
||||
const selectEl = formBuy.querySelector('select');
|
||||
const newOption = document.createElement('option');
|
||||
newOption.textContent = '5 items';
|
||||
selectEl.append(newOption);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user