需要做一个 前台界面 调用数据库里面的简单网页

2025-04-16 02:32:08
推荐回答(3个)
回答1:

举个例子
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<%@ include file="/WEB-INF/jsp/powerFilter.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>












//function modifylafter()
//{
//    if(checkedFormNum(document.myform.operatorWorkNumID))
// {
//document.myform.action="/mktweb/cancelgroupshare.do";
//myform.submit();
// location.href="modifystaff.html";
//}else
//{
// //alert("请选择需要修改的群组");
// alert("操作违法,请选择一条记录");
// return;
//}
//}

       function create()
       {
myForm = document.getElementById("frm");
myForm.method = "post";
myForm.action = "<%=basePath %>shop.do?method=toCreateS4Page";
myForm.submit();
       }

       function detail()
       {
var check_num=getCheckNum(frm,"listCheck");

if(1 != check_num)
{
alert("请选择一条记录!");
return;
}
myForm = document.getElementById("frm");
myForm.method = "post";
myForm.action = "<%=basePath %>shop.do?method=toDetailS4Page";
myForm.submit();
    }

      function modify()
{
    var check_num=getCheckNum(frm,"listCheck");
if(1 != check_num)
{
alert("请选择一条记录!");
return;
}
myForm = document.getElementById("frm");
myForm.method = "post";
myForm.action = "<%=basePath %>shop.do?method=toUpdateS4Page";
myForm.submit();

}

function deletewph()
{
var check_num=getCheckNum(frm,"listCheck");
if(0 == check_num)
{
alert("请选择一条或多条记录记录!");
return;
}
if (confirm("是否确认删除?")==false)
{
return;
}
myForm = document.getElementById("frm");
myForm.method = "post";
myForm.action = "<%=basePath %>shop.do?method=doDeleteS4";
myForm.submit();

}

function querydetail(operatorid)//查询详情
{

myForm = document.getElementById("frm");
myForm.method = "post";
myForm.action = "<%=basePath %>shop.do?method=toDetailS4Page&id="+operatorid;
myForm.submit();
}
function querytest()//查询
{

myForm = document.getElementById("frm");
myForm.method = "post";
myForm.action = "<%=basePath %>shop.do?method=queryS4Page";
myForm.submit();
}



























        现在的位置:首页>>场地监管>>4S店信息管理

    
    
                    
                  
                     
                        4S店编号:
                     
                     
                     
                        4S店名称: 
                     
                   
                     
                           
                    
                    
                    
              
             



    
    
    
              
                
                 
                
              
                4S店编号
                4S店名称
                状态
                有效期
                联系地址
                联系人
                手机号
                路由地址
               备注
              
              
              

date_table_tr_adddate_table_tr_odd">




 


 


 


 


 




 


 

        
 


 




var operator = document.getElementById('s4');
operator.disabled = false;







没有相关记录!



 
            
            
       <%@ include file="/WEB-INF/jsp/pager.jsp"%>
     








   

   










回答2:

链接数据库后在数据库里准备好一个表
表里的每个字段名 对应的英文就是 手机号码 姓名 地区之类的。
比如:it_tel,it_name ,it_addr等等
在前台使用PHP语法把内容写入

用PHP POST或者GET的发送方式,利用form表单保存在数据库里
$it_tel = $_POST['it_tel'];
最后在利用PHP和mysql语法保存数据 读取数据即可。

回答3:

要什么语言的呢,什么数据库

相关问答
最新问答