Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- #msg{
- font-family:arial;
- font-size:13px;
- color:#333;
- border: 1px solid #999;
- padding:3px;
- margin:0;
- }
- #kirim,#reset{
- border:1px solid #999;
- background:#088000;
- color:#fff;
- font-family:arial;
- font-size:13px;
- display:inline-block;
- margin:0;
- padding:6px 12px;
- }
- #kirim[disabled]{
- color:#999;
- background:#4B6146;
- }
- </style>
- <script src="https://code.jquery.com/jquery-1.8.3.min.js"></script>
- <script>
- $(function(){
- $('#msg').keyup(function(){
- if($(this).val().length>0){
- $('#kirim').attr('disabled',false);
- }else{
- $('#kirim').attr('disabled',true);
- }
- });
- });
- </script>
- <form>
- <textarea id="msg" cols=20 rows=3></textarea><br />
- <input id="reset" type="reset" class="button" value="Hapus" />
- <input id="kirim" type="submit" class="button" value="Kirim" disabled />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement