📄 editpt.asp
字号:
<!--#include file="xp.asp"-->
<%if session("shopxpadmin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='shopxplogin.asp';</script>"
response.End
end if
dim shopxpptid
shopxpptid=request.QueryString("id")
if not isnumeric(shopxpptid) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
end if
%>
<html><head><title>商品资料修改</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<script language="JavaScript">
<!-- Hide from older browsers...
//Function to format text in the text box
function FormatText(command, option){
frames.message.document.execCommand(command, true, option);
frames.message.focus();
}
//Function to add image
function AddImage(){
imagePath = prompt('请输入图片地址', 'http://');
if ((imagePath != null) && (imagePath != "")){
frames.message.document.execCommand('InsertImage', false, imagePath);
frames.message.focus();
}
frames.message.focus();
}
//Function to clear form
function ResetForm(){
if (window.confirm('确认要清空对话框内容?')){
frames.message.document.body.innerHTML = '';
return true;
}
return false;
}
//Function to open pop up window
function openWin(theURL,winName,features) {
window.open(theURL,winName,features);
}
function setMode(newMode)
{
bTextMode = newMode;
var cont;
if (bTextMode) {
cleanHtml();
cleanHtml();
cont=message.document.body.innerHTML;
message.document.body.innerText=cont;
} else {
cont=message.document.body.innerText;
message.document.body.innerHTML=cont;
}
message.focus();
}
function cleanHtml()
{
var fonts = message.document.body.all.tags("FONT");
var curr;
for (var i = fonts.length - 1; i >= 0; i--) {
curr = fonts[i];
if (curr.style.backgroundColor == "#ffffff") curr.outerHTML = curr.innerHTML;
}
}
// -->
</script>
<script language="JavaScript">
function help()
{
var helpmess;
helpmess="---------------填写帮助---------------\r\n\r\n"+
"1.请不要发表有危险性的脚本。\r\n\r\n"+
"2.如果要书写源代码,请选中\r\n\r\n"+
" 查看HTML源代码书写.\r\n\r\n"+
"3.需要你自己运行,才能看效果.\r\n\r\n"+
"4.如果书写js,尽量不要在这儿书写.\r\n\r\n";
alert(helpmess);
}
</script>
<script src="edit.js" type="text/javascript"></script>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shopxp_stype order by shopxpse_idorder ",conn,1,1
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from shopxp_ztype order by xpx ",conn,1,1
%>
<script language = "JavaScript">
var onecount;
var threecount;
onecount=0;
threecount=0
subcat3=new Array();
<%
count = 0
do while not rs2.eof
%>
subcat3[<%=count%>] = new Array("<%= trim(rs2("xclass"))%>","<%= rs2("shopxpse_id")%>","<%= rs2("id")%>");
<%
count = count + 1
rs2.movenext
loop
rs2.close
%>
threecount=<%=count%>;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("shopxpse_name"))%>","<%= rs("shopxpbe_id")%>","<%= rs("shopxpse_id")%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.shopxpse_id.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.shopxpse_id.options[document.myform.shopxpse_id.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
changelocation3(document.myform.shopxpse_id.options[document.myform.shopxpse_id.selectedIndex].value)
}
function changelocation3(locationid)
{
document.myform.xclassid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < threecount; i++)
{
if (subcat3[i][1] == locationid)
{
document.myform.xclassid.options[document.myform.xclassid.length] = new Option(subcat3[i][0], subcat3[i][2]);
}
}
}
//-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -