웹 페이지를 만들고 있습니다. 내 헤더 클래스에 로그인 버튼이 있습니다. 버튼을 클릭하면 드롭 다운 상자가 나타나고 두 개의 입력 상자가 있습니다. 하지만 입력 상자를 클릭하면 내 드롭 다운 상자가 비활성화됩니다. 왜?드롭 다운 메뉴의 입력 상자
코드 :
<li class="dropdown nav navbar-nav ">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Log in<b class="caret"></b>
</a>
<ul class="dropdown-menu" style=" padding:10%;">
<label class="labelstyle">First Name:
<input name="fname" autofocus type="text" class="active" id="myinputbox1"
size="25" maxlength="50" autofocus/>
</label>
<label class="labelstyle">password:
<input name="fname" type="text" class="fieldstyle" id="myinputbox2"
size="25" maxlength="50" />
</label>
<li class="divider"></li>
<li>
<button href="#" class="btn btn-success">log in</button>
<button href="#" class="btn btn-success" style="float:right;">Cancel</button>
</li>
</ul>
자바 스크립트 코드 게시. * something *은'.dropdown-toggle' 클래스를 동작시키고, 당신은 그것을 게시하지 않았습니다. –
JS는 어디에 있나요 ?? – thecodejack
이벤트 버블 링과 관련이 있다고 생각합니다. 문제를 해결하는 데 도움이되는 javascript/jQuery를 공유하십시오. –