📄 aphm103.jsp
字号:
<html>
<head>
<title>管理软件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<%@ include file="../aadm/jspheader.jsp"%>
<%@ page contentType="text/html; charset=gb2312" %>
<%
/**
* <p>功能: 编辑规格</p>
* <p>作者: sxit</p>
* <p>公司: 深训信科</p>
* <p>日期: 2005-03-22</p>
* @版本: 1.0
* @修改:
**/
%>
<%
com.sxit.phonemanager.Tphmmode tphmmode=null;
if(request.getAttribute("tphmmode")!=null){
tphmmode=(com.sxit.phonemanager.Tphmmode)request.getAttribute("tphmmode");
}
int i=0;
int j=0;
%>
<script lanaguage="javascript">
<!--
function isEmpty(s){
return ((s == null) || (s.length == 0))
}
function isInBag(s,bag){
var i;
for (i = 0; i < s.length; i++){
var c = s.charAt(i);
if (bag.indexOf(c) == -1) return false;
}
return true;
}
function isNotInBag(s,bag){
var i;
for (i = 0; i < s.length; i++){
var c = s.charAt(i);
if (bag.indexOf(c) > -1) return false;
}
return true;
}
function isGoodChar(content2){
if (isNotInBag(content2," -_.><,[]{}?/+=|\\\'\":;~!@#$%^&()`")) return true;
else return false;
}
function isNumber(content2){
if (isInBag(content2,"0123456789")) return true;
else return false;
}
function isDouble(content2){
if (isInBag(content2,".0123456789")) return true;
else return false;
}
function isLetter(content2){
if (isInBag(content2,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")) return true;
else return false;
}
function isLetterNumber(content2){
if (isInBag(content2,"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")) return true;
else return false;
}
function isTel(content2){
if (isInBag(content2,",;/()-0123456789 ")) return true;
else return false;
}
//str全部为空格
function isSpace(content2){
for(i=0;i<content2.length;i++){
var c=content2.charAt(i);
if(c!=" ") return false;
}
return true;
}
//str为邮件地址
function isEMail(content2){
len=content2.length;
pos1=content2.indexOf("@");
pos2=content2.indexOf(".");
if ((pos1<= 0)||(pos1==len)||(pos2<= 0)||(pos2== len)){
return false;
}else{
if((pos1==pos2-1)||(pos1==pos2+1)){
return false;
}
}
return true;
}
function getStringLength(content2){
var num=0;
if (content2!=""){
var i;
var s;
for(i=0;i<content2.length;i++){
s=content2.charCodeAt(i);
if(s-128<0) num=num+1;
else num=num+2;
}
}
return num;
}
function isOneSpace (s)
{
var whitespace = " tnr";
var i;
for (i = 0; i < s.length; i++)
{
var c = s.charAt(i);
if (whitespace.indexOf(c) >= 0)
{
return true;
}
}
return false;
}
function getValue(){
if(isEmpty(document.form1.modename.value)){
alert("请输入规格名,不能为空!");
document.form1.modename.focus();
return false;
}else{
if(isSpace(document.form1.modename.value)){
alert("请输入正确规格名,不能全部为空格!");
document.form1.modename.focus();
return false;
}else{
if(getStringLength(document.form1.modename.value)>20){
alert("请输入正确规格名,长度为1-20位!");
document.form1.modename.focus();
return false;
}
}
}
if(getStringLength(document.form1.screenlength.value)>5){
alert("请输入正确长度,长度为1-5位!");
document.form1.screenlength.focus();
return false;
}else{
if(!isNumber(document.form1.screenlength.value)){
alert("请输入正确长度,数字!");
document.form1.screenlength.focus();
return false;
}
}
if(getStringLength(document.form1.screenwidth.value)>5){
alert("请输入正确宽度,长度为1-5位!");
document.form1.screenwidth.focus();
return false;
}else{
if(!isNumber(document.form1.screenwidth.value)){
alert("请输入正确宽度,数字!");
document.form1.screenwidth.focus();
return false;
}
}
if(getStringLength(document.form1.ringmode.value)>30){
alert("请输入正确铃声,长度为1-30位!");
document.form1.ringmode.focus();
return false;
}
if(getStringLength(document.form1.colormode.value)>30){
alert("请输入正确颜色,长度为1-30位!");
document.form1.colormode.focus();
return false;
}
if(isEmpty(document.form1.screenlength.value)){
document.form1.screenlength.value=0;
}
if(isEmpty(document.form1.screenwidth.value)){
document.form1.screenwidth.value=0;
}
document.form1.save.value="save";
return true;
}
// -->
</script>
</head>
<body leftmargin="0" marginwidth="0" marginheight="0" topmargin="0">
<%@ include file="../aadm/menu.jsp"%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table1">
<tr class="tr1">
<td>您目前正在手机管理-规格管理-编辑规格页面</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" class="table2">
<tr class="tr2">
<td>
<form name="form1" action="../aphm/aphm103" method="post" onsubmit="return getValue()">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table3">
<tr>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table5">
<tr>
<td colspan="2"> <font color="#FF3300"> 红色 * 注明为必填项</font></td>
</tr>
<%if(tphmmode!=null){%>
<tr>
<td colspan="2"><input type="hidden" name="save"></td>
</tr>
<tr>
<td align="right" class="td51">
</td>
<td class="td52">
<input type="hidden" name="modeid" size="20" value="<%=tphmmode.getModeid()%>" maxlength="10">
</td>
</tr>
<tr>
<td align="right" class="td51">
规格名:
</td>
<td class="td52">
<input type="text" name="modename" size="20" value="<%=tphmmode.getModename()==null?"":tphmmode.getModename()%>" maxlength="20" class="text1"> <font color="#FF3300"> * 长度为1-20位</font>
</td>
</tr>
<tr>
<td align="right" class="td51">
长度:
</td>
<td class="td52">
<input type="text" name="screenlength" size="20" value="<%=tphmmode.getScreenlength()%>" maxlength="5" class="text1">
</td>
</tr>
<tr>
<td align="right" class="td51">
宽度:
</td>
<td class="td52">
<input type="text" name="screenwidth" size="20" value="<%=tphmmode.getScreenwidth()%>" maxlength="5" class="text1">
</td>
</tr>
<tr>
<td align="right" class="td51">
铃声:
</td>
<td class="td52">
<input type="text" name="ringmode" size="20" value="<%=tphmmode.getRingmode()==null?"":tphmmode.getRingmode()%>" maxlength="30" class="text1">
</td>
</tr>
<tr>
<td align="right" class="td51">
颜色:
</td>
<td class="td52">
<input type="text" name="colormode" size="20" value="<%=tphmmode.getColormode()==null?"":tphmmode.getColormode()%>" maxlength="30" class="text1">
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table6">
<tr>
<td>
</td>
</tr>
<tr align="center">
<td><input type="submit" value="保存" class="button1"><input type="button" value="返回" onclick="javascript:history.back(-1)" class="button1">
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<%}else{%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table7">
<tr align="center">
<td>暂时没有规格信息!
</td>
</tr>
<tr align="center">
<td><input type="button" value="返回" onclick="javascript:history.back(-1)" class="button1">
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<%}%>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -