hspace,vspace,做一个网页例子让我看一看!

解决方案 »

  1.   

    <html>
    <head>
    <script type="text/javascript">
    function setSpace()
      {
      document.getElementById("compman").hspace="50"
      document.getElementById("compman").vspace="50"
      }
    </script>
    </head>
    <body><img id="compman" src="http://www.w3school.com.cn/i/eg_compman.gif" alt="Computerman" align="right" />
    <p>Some text. Some text. Some text. Some text.</p>
    <input type="button" onclick="setSpace()" value="Set hspace and vspace"></body>
    </html>
      

  2.   

    /*public void doPost(HttpServletRequest request,HttpServletResponse
     * respond throws ServletException,IOEception{
     * String user=request.getParameter("u");
     * String pass=request.getParameter("p");
     * 
     * request.getSession().setAttribute("user",user);
     * 
     * String path="";
     * SeverletContext sc=this.getServletContext();
     * ArrayList al=(ArrayList)sc.getAttribute("userList");
     * if(al==null)
     * {
     *   al=new ArrayList();
     *   al.add(user);
     *   sc.setAttribute("userList",al);
     *   path.="/zzzzz/index.jsp";
     *   
     * }
     *  else
     * )
     * 
     * }请帮我再做一个在线考试系统项目的和我上面代码相对应的程序,我是说我在做这个项目,
    你帮助我朝着项目的方向,把我这个部分代码写成一个能实现项目相关功能的程序。谢谢了。