๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Lect & Tip111

JAVASCRIPT FOR DETECTING BROWSER LANGUAGE (๋ธŒ๋ผ์šฐ์ € ์–ธ์–ด ์ถ”์ถœ) ํ˜„์žฌ ๋ธŒ๋ผ์šฐ์ € ์–ธ์–ด ์„ค์ •๊ฐ’์„ ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ๋ฒ•์—๋Š” IE์™€ ๋น„ IE(ํŒŒํญ, ํฌ๋กฌ ๋“ฑ๋“ฑ)์˜ ์ฐจ์ด๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. IE์˜ navigator๊ฐ์ฒด์—๋Š” systemLanguage, userLanguage, browserLanguage ๊ฐ€ ์žˆ์–ด ๋งˆ์น˜ ๋ธŒ๋ผ์šฐ์ € ์–ธ์–ด๋ฅผ ๋ณด์—ฌ์ค„ ๊ฒƒ ๊ฐ™์ง€๋งŒ, ์ „ํ˜€ ๊ทธ๋ ‡์ง€ ์•Š์•„ ์‚ฌ๋žŒ์„ ํ˜ผ๋ž€์— ๋น ํŠธ๋ฆฌ์ฃ . ํ˜ผ๋ž€์„ ์ฃผ๋Š” IE์ „์šฉ ์†์„ฑ navigator.userLanguage OS์˜ ์ œ์–ดํŒ – ๊ตญ๊ฐ€ ๋ฐ ์–ธ์–ด – ์ž…๋ ฅ ์–ธ์–ด๋ฅผ ๋‚˜ํƒ€๋‚ธ๋‹ค. navigator.browserLanguage, navigator.systemLanguage OS์˜ ์ œ์–ดํŒ – ๊ตญ๊ฐ€ ๋ฐ ์–ธ์–ด – ํ‘œ์‹œ ์–ธ์–ด์˜ ๋ฐ˜ํ™˜ํ•œ๋‹ค.(browserLanguage์™€ systemLanguage์˜ ์ฐจ์ด๋Š” ๋ฐœ๊ฒฌํ•˜์ง€ ๋ชปํ–ˆ๋‹ค.) ๋ชจ๋‘ OS ์–ธ์–ด ์„ค์ •๊ณผ ์—ฐ๊ด€๋˜์–ด์žˆ๋‹ค $.. 2021. 7. 21.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ navigator.useragent๋กœ ๋ธŒ๋ผ์šฐ์ € ์ •๋ณด๋ฅผ ํ™•์ธํ•˜๊ธฐ. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ navigator.useragent๋กœ ๋ธŒ๋ผ์šฐ์ € ์ •๋ณด๋ฅผ ํ™•์ธํ•˜๊ธฐ. 2014.06.29 10:13 ํผ๋ธ”๋ฆฌ์‹ฑ์„ ํ•˜๊ฑฐ๋‚˜ ์›นํŽ˜์ด์ง€๋ฅผ ๊ฐœ๋ฐœํ•˜๋‹ค ๋ณด๋ฉด, ์‚ฌ์šฉํ•˜๋Š” ๋ธŒ๋ผ์šฐ์ €์˜ ํ™˜๊ฒฝ์— ๋”ฐ๋ผ ๋ถ„๊ธฐ๋ฅผ ์ฒ˜๋ฆฌํ•ด์ฃผ์–ด์•ผ ํ•  ๋•Œ๊ฐ€ ์ƒ๊ธด๋‹ค. ๊ทธ๋Ÿด ๋•Œ ๋ฐ˜๋“œ์‹œ ์ฒ˜๋ฆฌํ•ด ์ฃผ์–ด์•ผ ํ•  ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์˜ navigator.useragnet๋ฅผ ์ด์šฉํ•˜๋ฉด ๋ธŒ๋ผ์šฐ์ €์˜ ์ •๋ณด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ๋‹ค๋“ค ์•Œ๊ณ  ์žˆ๋Š” ๋ถ€๋ถ„์ธ๋ฐ, ์ด๋ ‡๊ฒŒ ํ™•์ธ๋œ useragent๊ฐ’์„ ์–ด๋–ป๊ฒŒ ํ™œ์šฉํ•  ๊ฒƒ์ธ๊ฐ€๊ฐ€ ๋ถ€์ฐจ์ ์ธ ๋ฌธ์ œ๊ฐ€ ๋œ๋‹ค. ์ผ๋‹จ์€ ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” userAgent๋ฅผ ๋ฌธ์ž์—ด๋กœ ๋„˜๊ฒจ์„œ ํ™•์ธํ•˜๋Š” ๊ฒƒ๊นŒ์ง€๋งŒ ์ง„ํ–‰ํ•˜๋„๋ก ํ•˜๊ฒ ๋‹ค. var ua = navigator.userAgent; document.write(ua); ์œ„์˜ ํ‘œ์—์„œ ๋ณด๋‹ค์‹œํ”ผ ๊ต‰์žฅํžˆ ๊ฐ„๋‹จํ•˜๋‹ค. navigator.use.. 2021. 7. 1.
๋ฆฌ์•กํŠธ ๋ฐ์ดํŠธํ”ผ์ปค ํฌ๋งท api axios error๋ฌธ์ œ react datepicker date format axios not working ๋ฆฌ์•กํŠธ์—์„œ๋Š” jquery์šฉ ๋ฐ์ดํŠธ ํ”ผ์ปค๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋‹ค. ์•„๋‹ˆ ์‚ฌ์‹ค ๋ฆฌ์•กํŠธ์šฉ ๋ฐ์ดํŠธํ”ผ์ปค์ธ react datepicker๊ฐ€ ํ›จ์”ฌ ๊น”๋”ํ•˜๊ฒŒ ์‚ฌ์šฉ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๊ตณ์ด ์ œ์ด์ฟผ๋ฆฌ ๋ฐ์ดํŠธ ํ”ผ์ปค๋ฅผ ๋ถ™์—ฌ์•ผ ํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค. ์‚ฌ์‹ค ์•„์ง ๋ฆฌ์•กํŠธ๊ฐ€ ์ดˆ์งœ๋ผ react datepicker๋ฅผ ์˜จ์ „ํžˆ ๋‹ค๋ฃจ์ง€๋Š” ๋ชปํ•˜๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์ •์„์œผ๋กœ ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์‚ฌ์‹ค ๋‚˜๋„ ์ž˜ ๋ชจ๋ฅด๊ฒ ๋‹ค. ์ผ๋‹จ, ์‹ ๊ทœ ํ”„๋กœ์ ํŠธ์—์„œ datepicker๋ฅผ ์‚ฌ์šฉํ•  ์ผ์ด ์žˆ์–ด์„œ ์„ค์น˜ํ–ˆ๋‹ค. yarn add react-datepicker ํ˜น์€ npm i react-datepicker ๋กœ ์„ค์น˜ ํ•˜๋ฉด ๋˜๊ฒ ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ๋ฌธ์ œ๋Š” ์ด๋ ‡๊ฒŒ ์„ค์น˜ํ•˜๊ณ  import DatePicker from "react-datepicker"; ํ–ˆ์„ ๊ฒฝ์šฐ ์Šคํƒ€์ผ ๊นจ์ง ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. ์ด์œ ๋Š” ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ .. 2021. 5. 20.
CSS๋กœ ๋„ค์˜จ ํ…์ŠคํŠธ๋ฅผ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ• โœˆ๋„ค์˜จ ํ…์ŠคํŠธ๋Š” ๋ชจ๋“  ์›น ์‚ฌ์ดํŠธ์— ๋ฉ‹์ง€๊ณ  ๋ฏธ๋ž˜์ ์ธ ๋Š๋‚Œ์„ ๋”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ €๋Š” ํ•ญ์ƒ ๋„ค์˜จ์‚ฌ์ธ์˜ ๋งˆ๋ฒ•์„ ์ข‹์•„ํ–ˆ๊ณ  CSS๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์‹œ ๋งŒ๋“ค๊ณ  ์‹ถ์—ˆ์Šต๋‹ˆ๋‹ค. ๋‚˜๋Š” ๊ทธ๊ฒƒ์„ ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ๋ช‡ ๊ฐ€์ง€ ํŒ์„ ๊ณต์œ ํ•  ๊ฒƒ์ด๋ผ๊ณ  ์ƒ๊ฐํ–ˆ์Šต๋‹ˆ๋‹ค! ์ด ๊ธฐ์‚ฌ์—์„œ๋Š” ํ…์ŠคํŠธ์— ๋น›๋‚˜๋Š” ํšจ๊ณผ๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ CSS์™€ ํ‚ค ํ”„๋ ˆ์ž„์„ ์‚ฌ์šฉํ•˜์—ฌ ๋„ค์˜จ์‚ฌ์ธ์— ๋‹ค์–‘ํ•œ ๋ฐฉ๋ฒ•์„ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ์€ ์šฐ๋ฆฌ๊ฐ€ ๋งŒ๋“ค ๊ฒƒ์ž…๋‹ˆ๋‹ค. ํ…์ŠคํŠธ์— ๊ธ€๋กœ์šฐ ํšจ๊ณผ ์ถ”๊ฐ€ ๋จผ์ € ํ…์ŠคํŠธ๋ฅผ ๋น›๋‚˜๊ฒŒ ๋งŒ๋“ค์–ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. text-shadow์†์„ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ CSS์—์„œ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.๊น”๋”ํ•œ ์  text-shadow์€ ์‰ผํ‘œ๋กœ ๊ตฌ๋ถ„ํ•˜์—ฌ ์—ฌ๋Ÿฌ ๊ทธ๋ฆผ์ž๋ฅผ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. .neonText { color: #fff; text-shadow: 0 0 .. 2021. 5. 6.
ReactJS input, select disabled ์ œ์–ด. Warning: Received the string `false` for the boolean attribute `disabled`. The browser will interpret it as a truthy value. Did you mean disabled={false}? ReactJS Warning: Received the string `false` for the boolean attribute `disabled`. The browser will interpret it as a truthy value. Did you mean disabled={false}? ReactJS input, select disabled ์ œ์–ด. index.js:1 Warning: Received the string `false` for the boolean attribute `disabled`. The browser will interpret it as a truthy value. Did you mean disabled={false}? at input at td at tr at tbody at t.. 2021. 3. 23.
๋ฆฌ์•กํŠธ Warning: Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>. ๋ฆฌ์•กํŠธ ํ”„๋ŸฐํŠธ์—”๋“œ ๊ฐœ๋ฐœ ์ค‘์— select๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ jquery๋ฅผ ์“ฐ๋˜ ์Šต์„ฑ๋Œ€๋กœ ์ฝ”๋”ฉ์„ ํ•˜๋‹ค ๋ณด๋ฉด ๋ฐ˜๋“œ์‹œ ๋งŒ๋‚˜๊ฒŒ ๋˜๋Š” ํ”ํ•œ ์˜ค๋ฅ˜ ์ค‘์˜ ํ•˜๋‚˜๊ฐ€ ๋ฐ”๋กœ selected๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ๋ง๋ผ๋Š” ๊ฒฝ๊ณ ๋‹ค. Warning: Use the `defaultValue` or `value` props on instead of setting `selected` on . 'selected'๋Œ€์‹ ์— select์— defaultValue ๋˜๋Š” value props๋ฅผ ์‚ฌ์šฉํ•˜๋ผ๋Š” ๋œป์ด๋‹ค. ์ž˜๋ชป ์“ด ๋ฆฌ์•กํŠธ ์…€๋ ‰ํŠธ ์‚ฌ์šฉ๋ฒ• ์„ ํƒ์•ˆํ•จ ๊ฐ€๋งน ํ•ด์ง€ ; ์•„๋ž˜์™€ ๊ฐ™์ด ์“ฐ๋ฉด ๊ฐ„๋‹จํ•˜๋‹ค. ์„ ํƒ์•ˆํ•จ ๊ฐ€๋งน ํ•ด์ง€ ref props๋Š” ํ•„์š”์— ๋”ฐ๋ผ ์‚ฌ์šฉ๋œ ๊ฒƒ์ด๋‹ˆ ์‹ ๊ฒฝ์“ฐ์ง€ ์•Š์•„๋„ ๋ฌด๋ฐฉํ•˜๋‹ค. ๋งŒ์•ฝ select์—์„œ ๋ฉ€ํ‹ฐํ”Œ ์…€๋ ‰ํŠธ๋กœ ์„ ํƒํ•  ๊ฒฝ์šฐ์—๋Š” value๋ฅผ ๋ฐฐ์—ด๋กœ ์ฃผ๋ฉด .. 2021. 2. 27.