Implementation of HTML command line interface

Implementation of HTML command line interface
HTML Part

Copy code
The code is as follows:

<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<title>WeChat Manager</title>
<link href="css/index.css" rel="stylesheet" type="text/css">
<script src="http://code.jquery.com/jquery-1.10.2.min.js">
</script>
<script>
$(document).ready(function(){
$(document).keyup(function(event){
if(event.keyCode == 13){
$.ajax({
type: "POST",
url: "ok.php",
data: "code="+$("#in").val(),
success: function(msg){
$("ul").append("<li>"+$("#in").val()+"</li>"); // Output the input to the interface
$("ul").append("<li>"+msg+"</li>"); //Get the return value and output
$("#in").val(""); //Clear input box
$("#text").scrollTop($("#text").scrollTop()+32); //Scroll the bar to the bottom to display the input box
}
});
}
});
$("#in")[0].focus();
});
</script>
</head>
<body>
<div class="window">
<div class="title">
<img src="css/1.jpg">
<span>Wechat Dos</span>
</div>
<div id="text">
<ul>
<li>Welcome...</li>
<li>login:</li>
</ul>
<input type="text" name="" id='in'>
</div>
</div>
</body>
</html>

CSS Part

Copy code
The code is as follows:

@charset "utf-8";
body {
background-color:#396DA5;
margin:0px;
padding:0px;
color:#fff;
font:"Microsoft YaHei";
font-size:14px;}
.window {
border:6px #ccc outset;
width:680px;
height:442px;
background-color:#000;
position:absolute;
top:40px;
left:68px;
overflow:hidden}
.title {
background-color:#08246B;
padding:2px;}
#text {
background-color:#000;
border-top:#ccc outset 2px;
height:420px;
overflow-y:scroll;}
ul {
margin:0px;
padding:0px;
list-style:none;}
input {
background-color:#000;
border:0;
color:#fff;
outline:none;
/*font-size:12px;*/
width:100%}

Effect picture:

<<:  Use vue to realize the registration page effect vue to realize SMS verification code login

>>:  A brief summary of my experience in writing HTML pages

Recommend

VMware Workstation virtual machine installation operation method

Virtual machines are very convenient testing soft...

10 SQL statement optimization techniques to improve MYSQL query efficiency

The execution efficiency of MySQL database has a ...

Access the MySQL database by entering the DOS window through cmd under Windows

1. Press win + R and type cmd to enter the DOS wi...

Some suggestions on Vue code readability

Table of contents 1. Make good use of components ...

CSS warped shadow implementation code

This article introduces the implementation code o...

Detailed analysis and testing of SSD performance issues in MySQL servers

【question】 We have an HP server. When the SSD wri...

Use three.js to achieve cool acid style 3D page effects

This article mainly introduces how to use the Rea...

MySQL index optimization: paging exploration detailed introduction

Table of contents MySQL Index Optimization Paging...

How to implement Docker to dynamically pass parameters to Springboot projects

background Recently, some friends who are new to ...

Detailed explanation of Docker Volume permission management

Volume data volume is an important concept of Doc...

Why is your like statement not indexed?

Preface This article aims to explain the most bor...

Detailed explanation of the middleman mode of Angular components

Table of contents 1. Middleman Model 2. Examples ...