JavaScript: div,textarea set or get value

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>div,input, set,get value </title>
	<meta name="Description" content="geovindu"/>
<meta name="Keywords" content="geovindu"/>
<meta name="author" content="geovindu"/>
	
  <script src="ajax/libs/modernizr/2.8.3/modernizr.min.js" type="text/javascript"></script>
	 <script src="bootstrap/4.6.2/js/bootstrap.min.js" type="text/javascript"></script>
  <link rel="stylesheet" href="bootstrap/4.6.2/css/bootstrap.min.css">
	  <script  src="js/jquery-3.6.0.js"></script>
	 <script  type="text/javascript" src="assets/js/DuSize.js"></script>
  <link rel="stylesheet" href="css/main.css">

	
</head>

<body>
<textarea id="txtMessage" class="txtMessage" name="txtMessage" ></textarea>
<div class="emojionearea-editor" contenteditable="true" placeholder="" tabindex="0" dir="ltr" spellcheck="false" autocomplete="off" autocorrect="off" autocapitalize="off">geovindu,塗聚文</div>
                            <div class="input-group" style="float: right;">
                                <input class="form-control" style="visibility: hidden;" />
                                <span class="input-group-btn">
                                    <input type="button" class="btn btn-primary btn-flat" id="btnSendMsg" value="send" />

                                </span>

    </div>	
<script type="text/javascript">
	
	const textarea = document.getElementById('txtMessage');
	var geovinduhtml = $('.emojionearea-editor').html(); 
	$(function () {
		 $('#btnSendMsg').click(function () {
			
			var msg=$("#txtMessage").val();
		      alert(msg);
			 console.log("MSG:"+textarea.value);
			 console.log("MSG:"+msg)
			 console.log("div:"+geovinduhtml)
		      textarea.value = "";
              $("#txtMessage").val("");
             $(".emojionearea-editor").html("");
             console.log("msg:"+textarea.value)
			
	 });	
		
	});
	

	</script>
	</body>
</html>

  

Microsoft.Web.Services3


Web Services Enhancements (WSE) 3.0 for Microsoft .NET
https://www.microsoft.com/en-us/download/details.aspx?id=14089
https://www.nuget.org/packages/Microsoft.Web.Services3

Web Services Enhancements (WSE) 2.0 SP3 for Microsoft .NE
https://www.microsoft.com/en-us/download/details.aspx?id=23689
https://www.nuget.org/packages/Microsoft.Web.Services2

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章