Tôi không làm việc này. Trình đơn thả xuống luôn đóng cửa.Trình đơn thả xuống Twitter Bootstrap đóng lại khi được nhấp vào
Tôi muốn có thể gửi tin nhắn từ trình đơn thả xuống.
Tôi bao gồm cả bootstrap.js
, bootstrap.css
và bootstrap-responsive.css
trong tiêu đề.
Làm cách nào để có được menu thả xuống này không đóng?
<head>
<script type='text/javascript'>//<![CDATA[
$(window).load(function() {
$('.dropdown-menu textarea a').click(function (e) {
e.stopPropagation();
});
});
function ShowDr(div) {
$("#medr" + div).css("display", "block");
$("#xdr" + div).focus();
}
//]]>
</script>
</head>
<body>
<ul class="nav">
<li class="dropdown" data-dropdown="dropdown">
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown"> Message
<b class="caret"></b></a>
<ul class="dropdown-menu dropdown-menu-large">
This is a message from the user John to Ann. If Ann wants to send an answer she will click the link. Then
the textarea will become visible.
<a href="javascript:void(0)" onclick="javascript:ShowDr('18')"><img src='/img/reply.gif'> Answer</a><br/>
<div id="medr18" style="display:none" class="medr">
<li>
<div style="padding:20px;">
<textarea name="xdr18" id="xdr18" class="textareasmall"></textarea> <br /><input type=button value="Send" class="btn btn-success btn-medium" onclick="GoM('2','Message sent')" />
</div>
</li>
</div>
</ul>
</li>
</ul>
Bạn đã thử nghiệm trình duyệt này trên trình duyệt nào? –