📄 face.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="con" scope="page" class="numb1.com.db"/>
<%
String id=(String)session.getAttribute("id");
String face="";
String sql="select face from user where userid='"+id+"'";
ResultSet rs=con.query(sql);rs.next();
if(rs.getRow()!=0){
face=rs.getString(1);
}
con.close();
if(face.compareTo("")==0){face="face/1.gif";}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>选择个人形象</title>
<style type="text/css">
<!--
td{font-size:13px;}
a:link{text-decoration:none;color:#0000ff}
a:visited{text-decoration:none;color:#0000ff}
a:hover{text-decoration:underline;color:#96CCFE}
.style1 {color: #FF0000}
.style2 {color: #FFFFFF}
-->
</style>
</head>
<body><form name="form1" method="post" action="action/actface.jsp">
<table width="450" border="0" align="center" cellspacing="1" bgcolor="#7188e0">
<tr>
<td colspan="3" bgcolor="#f8f8f8"><table width="100%" border="0" cellspacing="2">
<tr>
<th bgcolor="#7188e0" class="style2" style="font-size:16px ">更 换 照 片</th>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" bgcolor="#f8f8f8"> </td>
<td width="141" rowspan="7" bgcolor="#f8f8f8"><img src="<%=face%>" name=face1 width="140" height="190"></td>
</tr>
<tr>
<td width="96" bgcolor="#f8f8f8"><div align="right"><strong>系统给定:</strong></div></td>
<td width="183" bgcolor="#f8f8f8"><script language=javascript>
function showimage(){document.images.face1.src=document.form1.face.options[document.form1.face.selectedIndex].value;}
</script> <select name="face" onChange=showimage() style="BORDER: #ACACFF 1px solid;color:#1818FF;">
<option value="face/0.gif" <% if("face/0.gif".equals(face)){out.print("selected");}%>>0</option>
<option value="face/1.gif" <% if("face/1.gif".equals(face)){out.print("selected");}%>>1</option>
<option value="face/2.gif" <% if("face/2.gif".equals(face)){out.print("selected");}%>>2</option>
<option value="face/3.gif" <% if("face/3.gif".equals(face)){out.print("selected");}%>>3</option>
<option value="face/4.gif" <% if("face/4.gif".equals(face)){out.print("selected");}%>>4</option>
<option value="face/5.gif" <% if("face/5.gif".equals(face)){out.print("selected");}%>>5</option>
<option value="face/6.gif" <% if("face/6.gif".equals(face)){out.print("selected");}%>>6</option>
<option value="face/7.gif" <% if("face/7.gif".equals(face)){out.print("selected");}%>>7</option>
<option value="face/8.gif" <% if("face/8.gif".equals(face)){out.print("selected");}%>>8</option>
<option value="face/9.gif" <% if("face/9.gif".equals(face)){out.print("selected");}%>>9</option>
</select>
<img src="img/ch1.gif" width="99" height="22" onMouseOut="this.src='img/ch1.gif'" onMouseOver="this.src='img/ch2.gif'" onClick="window.open('face/faces.html','face1','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,top=150,left=100,width=440,height=400');" style="cursor:hand">
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#f8f8f8"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#f8f8f8">图片的最佳比例为:4:3,最佳尺寸为:190:140(<span class="style1">若要选择自定义的图片,请选择自定义处的复选框</span>)</td>
</tr>
<tr>
<td bgcolor="#f8f8f8"><div align="right"><strong>自定义:</strong></div></td>
<td bgcolor="#f8f8f8"> <input name="check" type="checkbox" id="check" value="z"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#f8f8f8">
<div align="right">
<input name="url" type="text" id="url" value="<%=face%>" size="32" style="BORDER: #ACACFF 1px solid;color:#1818FF;">
</div></td>
</tr>
<tr>
<th height="17" colspan="2" bgcolor="#f8f8f8"><input name="imageField" type="image" src="img/ok1.gif" width="60" height="22" border="0" onMouseOut="this.src='img/ok1.gif'" onMouseOver="this.src='img/ok2.gif'">
<img src="img/close1.gif" width="60" height="22" onClick="window.close();"onMouseOut="this.src='img/close1.gif'" onMouseOver="this.src='img/close2.gif'" style="cursor:hand"></th>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -