Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.0.0.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<textarea class="detail-textarea mt10" id="J-pull" placeholder="我也说一句"></textarea>
  <div class="r hide textarea-js" style="display: none;">  <button class="btn-normal btn10 J-send">发送</button></div>
</body>
</html>
 
.mt10 {
    margin-top: 10px;
}
.detail-textarea {
    width: 635px;
    height: 71px;
    border: 1px solid #d2d2d2;
    resize: none;
    font-size: 14px;
    padding: 15px 0 0 15px;
}
.hide {
    display: none;
}
.r {
    float: right;
}
.btn-normal {
    width: 100px;
    height: 30px;
    background: #2eafb3;
    color: #fff;
    line-height: 30px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 14px;
}
 
//显示弹出框
$("#J-pull").focus(function(){
   $(".textarea-js").show();
});
$("#J-pull").blur(function(){
    $(".textarea-js").hide();
});
$(".J-send").click(function(){
    var pop=$("#J-pull").text();
    alert(pop);
});
Output 300px

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers