mokwak
@mokwak2939
Reviews Written
-
Average Rating
-
Posts
Q&A
length error
ํด๊ฒฐํ์ต๋ใท. ๊ฐ์ฌํฉ๋๋ค
- 1
- 5
- 319
Q&A
length error
์ฌ๊ธฐ์ ์ด๋์ชฝ์ ๋ฌธ์ ์ธ์ง ์ ๋ชจ๋ฅด๊ฒ ์ต๋๋ค html> head> title>๊ทธ๋ฉ๋ง์ผtitle> link href="index.css" type="text/css" rel="stylesheet" /> script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js">script> head> body> div id="header"> div id="header-area"> img src="images/icons/logo.png" /> div> div> div id="body"> div id="banner"> img src="images/banners/banner1.png" /> div> h1>ํ๋งค๋๋ ์ํ๋คh1> div id="product-list">div> div> div id="footer">div> body> script> axios .get( "https://f858de03-8615-4980-9d75-55e70df4ab1d.mock.pstmn.io/products" ) .then(function (result) { console.log("ํต์ ๊ฒฐ๊ณผ : ", result); const products = result.data.products; let productsHtml = " "; for (var i = 0; i products.length; i++) { let product = products[i]; productsHtml = productsHtml + '' + "" + '(์ฌ์ง) + product.imageUrl + '" />' + "" + '' + '' + product.name + "" + '' + product.price + "" + '' + '(์ฌ์ง)' + "" + product.seller + " " + "" + "" + ""; } document.querySelector("#product-list").innerHTML = productsHtml; }) .catch(function (error) { console.log("error ๋ฐ์ : ", error); }); script> html>
- 1
- 5
- 319




