Git Product home page Git Product logo

Comments (2)

yamoo9 avatar yamoo9 commented on May 27, 2024

과거 statuswindow.status 속성으로 윈도우 하단에 표시되는 상태 바의 메시지를 설정할 때 사용했습니다.

하지만 오늘날 이는 사용되고 있지 않습니다. 대부분의 모던 웹 브라우저에서 하단 상태 표시바를 기본적으로 보이도록 설정하지 않고, 상태 변경 시에만 잠깐 보이도록 변경했기 때문인데요. (과거 상태 표시 줄이 악용 되던 경험 때문에)

변수로 status 이름을 사용하기 보다는 다른 이름을 사용하길 권장하지만, Chrome의 경우 아래 이미지처럼 개별 설정이 가능하기는 합니다. 웹 브라우저마다 차이가 있을 것으로 생각되네요. 가급적 변수 이름으로 status 그대로 사용하기 보다는 currentStatus 혹은 visible_status 등으로 사용하는 것을 권장드리고 싶습니다.

그리고 JavaScript 키워드/예약어 는 다음과 같습니다.

abstract, arguments,
boolean, break, byte,
case, catch, char, class, const, continue, 
debugger, default, delete, do, double, 
else, enum, eval, export, extends,
false, final, finally, float, for, function, 
goto, ,
if, implements, import, in, instanceof, int, interface,
let, long, 
native, new, null,
package, private, protected, public, 
return,
short, static, super, switch, synchronized,
this, throw, throws, transient, true, try, typeof, 
var, void, volatile,
while, with, 
yield

from jj_camp_fundamental.

dooly9 avatar dooly9 commented on May 27, 2024

예약어는 아니군요?
그런데 아래 소스인데 감추는건 되는데 보이기는 안되요. 크롬이구요..
변수 status를 currentStatus로 바꾸면 잘됩니다.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>

<body lang='KO-KR'>
<p class='memo'>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.</p>

<button type='button' class='button'>toggle</button>

<script>
var memo = document.querySelector('.memo');
var button = document.querySelector('.button');
var status = true;

button.onclick = function() {
    if (status) {
        memo.style.display = 'none';
        status = false;
    }
    else {
        memo.style.display = 'inherit';
        status = true;
    }
}
</script>
</body>
</html>

from jj_camp_fundamental.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.