logo

javascript:void(0)은 무엇을 의미하나요?

JavaScript에서 javascript:void(0)는 클릭해도 아무 작업도 수행하지 않는 의사 URL입니다. JavaScript 코드를 실행하는 동안 브라우저가 새 페이지로 이동하는 것을 방지하기 위해 일반적으로 href 속성의 자리 표시자로 사용됩니다.

앵커 태그에 # 사용

편집기에서 다음 코드를 작성하면 경고 메시지가 표시된 후 웹 페이지가 새로 고쳐집니다.

예:



HTML
     techcodeview.comtitle><style>h1 { 색상: 녹색;  } 스타일> 머리> <body> <h1>techcodeview.comh1><h3>JavaScript 없이:void(0)h3> <a href='#' ondblclick='alert('Welcome to Geeks for Geeks')'>나를 더블클릭하세요 a> <a href='#' ondblclick='geeks()'>나를 더블클릭하세요 a><script>function geeks() { document.getElementById('gfg').innerHTML = 'techcodeview.com에 오신 것을 환영합니다';  } 스크립트><p id='gfg'>p> 본문> html>></pre> </code> <p dir='ltr'>  <b>  <strong>산출:</strong>  </b>  <span> </span></p>  <img src='//techcodeview.com/img/javascript-questions/07/what-does-javascript.webp' alt="javascript:void(0)은 무엇을 의미하나요?"><p>javascript:void(0)은 무엇을 의미하나요?</p> <h2>  <b>  <strong>javascript:void(0) 사용; 앵커 태그에</strong>  </b>  </h2><p dir='ltr'><span>javascript:void(0); 작성 중 앵커 태그를 사용하면 페이지가 다시 로드되는 것을 방지할 수 있으며 한 번 또는 두 번 클릭하면 JavaScript 기능을 쉽게 호출할 수 있습니다.</span></p> <p dir='ltr'>  <b>  <strong>예:</strong>  </b>  <span> </span></p>HTML<code class='hljs'> <pre class='hljs'> <html lang='en'> <head> <meta charset='UTF-8'> <meta name='viewport' content='width=device-width,   initial-scale=1.0'> <title>techcodeview.comtitle><style>h1 { 색상: 녹색;  } 스타일> 머리> <body> <h1>techcodeview.comh1><h3>자바스크립트:void(0)h3> <a href='javascript:void(0);' ondblclick='geek()'>나를 더블클릭하세요 a><p id='gfg'>피><script>function geek() { document.getElementById('gfg').innerHTML = 'techcodeview.com에 오신 것을 환영합니다';  } 스크립트> 본문> html>></pre> </code> <p dir='ltr'>  <b>  <strong>산출:</strong>  </b>  <span> </span></p>  <img src='//techcodeview.com/img/javascript-questions/07/what-does-javascript-2.webp' alt="javascript:void(0)은 무엇을 의미하나요?"><p>javascript:void(0)은 무엇을 의미하나요?</p>  <br></article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//spiritscaution.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
                         
                        </div><!--//content-->
                    </div><!--//section-inner-->                 
                </section><!--//section-->
    
            </div><!--//primary-->
            <div class="secondary col-md-4 col-sm-12 col-xs-12">
                  <aside class="info aside section">
                    <div class="section-inner">
                        <h2 class="">범주</h2>
                        <div class="content">
                            <ul class="list-unstyled">
                                <li> <a href="/python-gui/">Python-Gui</a> </li><li> <a href="/english-difference-between/">영어 차이</a> </li><li> <a href="/graphic-designing/">그래픽 디자인</a> </li><li> <a href="/agile-tutorial/">애자일 튜토리얼</a> </li><li> <a href="/python-datatype/">Python 데이터 유형</a> </li><li> <a href="/yaml-tutorial/">Yaml 튜토리얼</a> </li><li> <a href="/java-awt-events/">자바 Awt 및 이벤트</a> </li><li> <a href="/random-algorithms/">무작위 알고리즘</a> </li><li> <a href="/linux-filters/">리눅스 필터</a> </li><li> <a href="/ruby-basics/">루비 기본</a> </li>
                                
                            </ul>
                        </div><!--//content-->  
                    </div><!--//section-inner-->                 
                </aside><!--//aside-->
                
                 <aside class="testimonials aside section">
                	 <div class="section-inner">
                        <div class="content">
                            <div class="item">
  								<div class="rekl_placeholder" id="sidebar_placeholder_1"> <script type="text/javascript">atOptions = {'key' : 'f53f1abf3c3a788f849c12a956865db1','format' : 'iframe','height' : 300,'width' : 160,'params' : {}};</script><script type="text/javascript" src="//spiritscaution.com/f53f1abf3c3a788f849c12a956865db1/invoke.js"></script> <br></div>                                                   
                            </div>
                        </div>
                    </div>
                   <div class="section-inner">
                        <h2 class="heading">Python에서 Valueerror 예외를 수정하는 방법</h2>
                        <div class="content">
                            <div class="item">
                                 <blockquote class="quote">                                  
                                    <span> <i class="fa fa-quote-left"></i> 괴짜를 위한 컴퓨터 공학 포털입니다. 여기에는 잘 쓰여지고, 잘 생각되고, 잘 설명된 컴퓨터 과학 및 프로그래밍 기사, 퀴즈 및 연습/경쟁 프로그래밍/회사 인터뷰 질문이 포함되어 있습니다.</span>
                                </blockquote>                
                                                                                             
                            </div><!--//item-->
                            
                            <p> <a class="more-link" href="/how-fix-valueerror-exceptions-python"> <i class="fa fa-external-link"></i> 자세히보기</a> </p> 
                            
                        </div><!--//content-->
                    </div><!--//section-inner-->
                </aside><!--//section-->
                
               
                            
                 <aside class="languages aside section">
                    <div class="section-inner">
                        <h2 class="heading">재미있는 기사</h2>
                        <div class="content">
                            <ul class="list-unstyled">
                                <li class="item">
                                    <span class="title"> <strong> <a href="/chemistry-class-11-cat/">화학-11급</a> </strong> </span>
                                    
                                </li><!--//item--><li class="item">
                                    <span class="title"> <strong> <a href="/python-get-unique-values-from-list">파이썬 | 목록에서 고유한 값 가져오기</a> </strong> </span>
                                    
                                </li><!--//item--><li class="item">
                                    <span class="title"> <strong> <a href="/difference-between-sit">SIT와 UAT의 차이점</a> </strong> </span>
                                    
                                </li><!--//item--><li class="item">
                                    <span class="title"> <strong> <a href="/asp-net-mvc-routing">ASP.NET MVC 라우팅</a> </strong> </span>
                                    
                                </li><!--//item--><li class="item">
                                    <span class="title"> <strong> <a href="/sat-score-percentiles-1311260">SAT 점수 백분위수(고정밀 버전)</a> </strong> </span>
                                    
                                </li><!--//item-->
                               
                            </ul>
                        </div><!--//content-->
                    </div><!--//section-inner-->
                </aside><!--//section-->
                
              
                 <aside class="list music aside section">
                    <div class="section-inner">
                        <h2 class="heading">인기 게시물</h2>
                        <div class="content">
                            <ul class="list"> <li><a href="/convert-list-array-java">자바 배열 목록</a>
</li><li><a href="/how-many-weeks-month">한 달은 몇 주입니까?</a>
</li><li><a href="/numpy-dot-python">np 도트</a>
</li><li><a href="/how-insert-watermark-word">워드에 워터마크 삽입</a>
</li><li><a href="/zeenat-aman">배우 제나 아만</a>
</li> 
                                
                                
                            </ul>
                        </div><!--//content-->
                    </div><!--//section-inner-->
                </aside><!--//section-->
              
            </div><!--//secondary-->    
        </div><!--//row-->
    </div><!--//masonry-->
    
	    <footer class="footer">
        <div class="container text-center">
                <span>
Copyright ©2025 판권 소유 |  <a href="//uk.techcodeview.com/">techcodeview.com</a> | <a href="/disclaimer" rel="nofollow noopener noreferrer" target="_blank">부인 성명</a>  |  <a href="/about-us" rel="nofollow noopener noreferrer" target="_blank">회사 소개</a>  |  <a href="/privacy-policy" rel="nofollow noopener noreferrer" target="_blank">개인 정보 보호 정책</a>  </span>
        </div>
    </footer>
 
         
    <script type="text/javascript" src="https://techcodeview.com/template/assets/plugins/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="https://techcodeview.com/template/assets/plugins/bootstrap/js/bootstrap.min.js"></script>    
    

    <script type="text/javascript" src="https://techcodeview.com/template/assets/js/main.js"></script>     
	
	<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"></script>
	<script>
!function(){"use strict";let t=document.createElement("button");t.id="toTopBtn",t.innerHTML="↑";let e=`
        #toTopBtn {
            position: fixed;
            bottom: 25px;
            right: 25px;
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            background-color: #213141;
            color: white;
            border: none;
            border-radius: 8px;
            width: 50px;
            height: 50px;
            font-size: 24px;
            cursor: pointer;
            transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        }
        #toTopBtn:hover {
            background-color: #555;
        }
    `,i=document.createElement("style");i.type="text/css",i.innerText=e,document.head.appendChild(i),document.body.appendChild(t),window.addEventListener("scroll",()=>{let e=window.scrollY||document.documentElement.scrollTop;e>300?(t.style.opacity="1",t.style.visibility="visible"):(t.style.opacity="0",t.style.visibility="hidden")}),t.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})})}();
</script>
</body>
</html>