자바 아 날로 그 서버 분석 웹 데이터

12118 단어 Java서버web
1.아 날로 그 서버 가 브 라 우 저 에서 보 낸 데 이 터 를 분석 합 니 다.

package cn.tedu.test;
//                  -- SpringMVC  
//http://127.0.0.1:8848/cgb2105/stu.html?user=1&age=2&sex=1&like=1&edu=2&time=2021-07-07
public class Test5 {
    public static void main(String[] args) {
        String url="http://127.0.0.1:8848/cgb2105/stu.html?user=1&age=2&sex=1&like=1&edu=2&time=2021-07-07";
//        1,  ?     ,  a  
//                [http://127.0.0.1:8848/cgb2105/stu.html ,
//                  user=1&age=2&sex=1&like=1&edu=2&time=2021-07-07]
//        2,            a[1]   user=1&age=2&sex=1&like=1&edu=2&time=2021-07-07
//        3,  &     ,  b  
//                [user=1,age=2,sex=1,like=1,edu=2,time=2021-07-07]
        String[] b= url.split("\\?")[1].split("&");
//        4,  b  ,  str,  user=1     age=2    sex=1
        for(String str : b){
//        5,   =  [user,1]   [age,2]
            String data = str.split("=")[1];
            System.out.println(data);
        }
        //TODO jdbc  
    }
}
2.CSS 선택 기

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>   css      </title>
		<!-- html  css -->
		<style>
			/* 1.      :               ,       */
				div,#s1{
					color: #008000;
				}
			/* 2.      :              */	
				input[type='text']{
					background-color: #FFFF00;
				}
		</style>
	</head>
	<body>
		<div>  div1</div>
		<div>  div2</div>
		<div>  div3</div>
		<span id="s1">  span1</span>
		<span>  span2</span>
		<p>  p</p>
		<input type="text" placeholder="  input1"></input>
		<input type="password" placeholder="  input2"></input>
	</body>
</html>
3.HTML 과 CSS 연습
在这里插入图片描述
C1,css 파일 만 들 기

/*   class=a    */
.a{
	width: 275px;/*    */
	height: 30px;/*    */
}
/*        */
input[type="submit"]{
	height: 30px;  /*    */
	width: 45px;   /*    */
	color: white; /*      */
	background-color: blue; /*    */
	border: 2px solid blue; /*              */
}
/*        */
input[type="button"]{
	height: 30px;  /*    */
	width: 45px;   /*    */
	color: white; /*      */
	background-color: hotpink; /*    */
	border: 2px solid hotpink; /*              */
}
C2,html 파일 수정

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>  form  </title>
		<!-- link       css  
			rel       ,        
			href          
		-->
		<link rel="stylesheet" href="1.css" />
	</head>
	<body>
		<!--         get   -->
		<form>
			<table>
				<tr>
					<td>
						<h3>        MIS</h3>
					</td>
				</tr>
				<tr>
					<td>
						  :
					</td>
				</tr>
				<tr>
					<td>
						<input class="a" type="text" placeholder="     " name="user" />
					</td>
				</tr>
				<tr>
					<td>
						  :
					</td>
				</tr>
				<tr>
					<td>
						<input class="a" type="number" placeholder="     " name="age" />
					</td>
				</tr>
				<tr>
					<td>
						  :(   ) 
						<input type="radio" name="sex" value="1" checked="checked"/> 
						<input type="radio" name="sex" value="0"/> 
					</td>
				</tr>
				<tr>
					<td>
						  :(  ) 
						<input type="checkbox" name="like" value="1"/>   
						<input type="checkbox" name="like" value="2" checked="checked"/>   
						<input type="checkbox" name="like" value="3"/>  
					</td>
				</tr>
				<tr>
					<td>
						  :(   ) 
						<select name="edu">
							<option value="1">  </option>
							<option value="2">  </option>
							<option value="3">  </option>
							<option value="4">  </option>
						</select>
					</td>
				</tr>
				<tr>
					<td>
						    : <br/>
						<input type="date" name="time"/>
					</td>
				</tr>
				<tr>
					<td>
						<input type="submit" value="  " />
						<input type="button" value="  " />
					</td>
				</tr>
			</table>
		</form>
		<audio controls="controls">
			<source src="jay.mp3"></source>
		</audio>
		<video controls="controls" loop="loop">
			<source src="b.mp4"></source>
		</video>
	</body>
</html>
4.css 의 상자 모형
C1,
개술
css 는 웹 페이지 의 모든 요 소 를 상자 로 본다.margin:바깥쪽 거 리 는 상자 와 상자 사이 의 거리 padding:안쪽 거 리 는 상자 안의 내용 과 여백 의 거리 width/height:내용 의 너비,높이 border:테두리
C2,연습
html 코드

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>       </title>
		<!--        css   -->
		<link rel="stylesheet" href="2.css"/>
	</head>
	<body>
<!-- form        ,method             ,action           -->
		<form method="get" action="#">
			<table>
				<tr>
					<td>
						<h2 style="padding-left:120px;">    </h2>
					</td>
				</tr>
				<tr>
					<td>
						<input type="text" placeholder="   " class="a" />
					</td>
				</tr>
				<tr>
					<td  class="b" >
						    、  、  、“-”、“_”   ,4-20   
					</td>
				</tr>
				<tr>
					<td>
						<input type="password" placeholder="    " class="a"  />
					</td>
				</tr>
				<tr>
					<td  class="b" >
						      、            ,6-20   
					</td>
				</tr>
				<tr>
					<td>
						<input type="password" placeholder="    " class="a" />
					</td>
				</tr>
				<tr>
					<td  class="b" >
						         
					</td>
				</tr>
				<tr>
					<td>
						<input type="number" placeholder="    " class="a" />
						 
						<a href="#">    </a>
					</td>
				</tr>
				<tr>
					<td id="m">
						<input type="checkbox"/>
						       
						<a href="#">《        》</a>
					</td>
				</tr>
				<tr>
					<td>
						<input type="submit" value="    "/>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
css 코드

/*       */
.a{
	width: 300px;/*    */
	height: 30px;/*    */
	padding: 10px;/*     */
	margin: 10px;/*     */
	font-size: 20px;/*      */
}
/*       */
.b{
	font-size: 10px; /*    */
	color: gray; /*    */
	padding-left:25px ; /*     */
}
/*         */
#m{
	padding-left: 25px;/*     */
}
/*          */
input[type="submit"]{
	background-color: #FF0000; /*     */
	color: white;/*      */
	font-size: 20px;/*    */
	height: 50px;/*    */
	width: 320px;/*    */
	margin-left: 10px;/*     */
	margin-top: 20px;/*     */
	border:1px solid red;/*    */
}
5,JS
C1,입문 사례

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>   js     </title>
		<!--  HTML  js,  2:  js -->
		<script>
			alert(100); /*  100 */
			confirm(); /*     */
			prompt("     :");/*     */
		</script>
	</head>
	<body>
		<!-- js        ,  1:  js 
			js               。
			      :         ,          
			onclick      ondblclick     onmouseenter       onmouseleave    
			alert         prompt         confirm   
		-->
		<a href="#" onclick="alert(10);">    </a>
		<a href="#" onclick="prompt();">     </a>
		<a href="#" onclick="confirm();">  ???</a>
		<a href="#" ondblclick="alert(10);">    </a>
		<a href="#" onmouseenter="alert(10);">      </a>
		<a href="#" onmouseleave="alert(10);">      </a>
	</body>
</html>
C2,기초 문법

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>   js     </title>
		<!--  HTML   JS   -->
		<script>
			/* 2. js     */
				//               
				var j=10;
				var k=20;
				alert( j < k ? k : j );
				//==   ===  
				alert(1==1); //  ,true
				alert(1===1); //     ,true
				alert(1==='1');//     ,false
				// % /   25        
				var g=25;
				alert( g%10 );//%  ,   
				alert( g/10 ); //2.5
				// ++  --
				var h = 10;
				h = h++ ;
				alert(h); //10
				/*  java ,         ?
					byte d = 1;
					d = d+1;  //  ,    
					d += 1;  //    ,      
				*/
			/* 1. js       ,            ,  :number string boolean null undefined */
				var a = 10;//number  
				a = 1.1; //number  
				a = "hello js" ; //string  
				a = 'hello js' ; //string  
				a = true ; //boolean  
				a = null ; //null  
				alert(a);
				var b ; alert(b); //undefined
				var c = 1.1 + 1.9 ; //+    
				alert(c); //      
				alert("c"+c); //+    
				//     --    
				var d = 1;
				var e = "hello" ;
				var f = d;
				d=e;
				e=f;
				alert(d +","+e);
		</script>
	</head>
	<body>
	</body>
</html>
총결산
이 글 은 여기까지 입 니 다.당신 에 게 도움 을 줄 수 있 기 를 바 랍 니 다.또한 당신 이 우리 의 더욱 내용 에 관심 을 가 져 주 기 를 바 랍 니 다!

좋은 웹페이지 즐겨찾기