如何學(xué)好java

          如何學(xué)好java,其實(shí)很簡(jiǎn)單,只要用心體會(huì),慢慢積累!
          posts - 106, comments - 7, trackbacks - 0, articles - 3
            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          url=jsp?str="你好!" 
          String areaName=(String)request.getParameter("areaname");
          String dpt=new String(dptName.getBytes("ISO8859-1"),"UTF-8");

          posted @ 2012-03-01 18:45 哈希 閱讀(201) | 評(píng)論 (0)編輯 收藏

            apache-comcat配置虛擬主機(jī)和虛擬目錄  jquery autocomplete 自動(dòng)填充文本框、文本域
          JS 導(dǎo)出excel,word實(shí)例  2011-10-10 11:55:00|  分類: 默認(rèn)分類 |  標(biāo)簽:js  excel  word   |字號(hào)大

          小 訂閱
          用js操作offace中的word,excel 必須首先確保你已經(jīng)安裝office,用js操作word,excel 用到了ActiveXObject類,它是專門用來調(diào)用windows操作中的程序的,下面是例子,直接復(fù)制到文本文件里,把后綴名改了就可以運(yùn)行!

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
          <title>無(wú)標(biāo)題文檔</title>
          <script type="text/javascript" language="javascript">
          function ExcelExport(tableid)   
          {   

            //檢索瀏覽器  
                      if(navigator.userAgent.indexOf("MSIE")<0){  
                          alert('請(qǐng)用ie瀏覽器進(jìn)行表格導(dǎo)出');  
                          return ;  
                      }  
                      var oXL = null;   
                      try {  
                          oXL = GetObject("", "Excel.Application");  
                      }  
                      catch (E) {  
                          try {  
                              oXL = new ActiveXObject("Excel.Application");  
                          }  
                          catch (E2) {  
                              alert("請(qǐng)確認(rèn):\n1.Microsoft Excel已被安裝.\n2.工具 => Internet 選項(xiàng)=> 安全 => 設(shè)置 \"啟用不安全的 ActiveX\"");  
                              return;  
                          }  
                      }  

              var table = document.getElementById(tableid);     
              var workbook = oXL.Workbooks.Add();   
               var sheet = workbook.ActiveSheet;   
               var sel = document.body.createTextRange();  //激活sheet
                 
               //把table中的數(shù)據(jù)移到sel中   
               sel.moveToElementText(table);   
                 
               sel.select(); //選中sel中所有數(shù)據(jù)   
               sel.execCommand("Copy");//復(fù)制sel中的數(shù)據(jù)    
                sheet.Columns("A:Z").ColumnWidth =20;//設(shè)置列寬  
               // sheet.Columns("B").ColumnWidth =35;  
                sheet.Rows(1).RowHeight = 35;//設(shè)置表頭高  
               //將sel中數(shù)據(jù)拷貝到sheet工作薄中  
               sheet.Paste();           
               oXL.Visible = true; 
            //sheet.Save("F:\\TEST.XLS" ); 
               //通過打印機(jī)直接將Excel數(shù)據(jù)打印出來  
               //sheet.Printout;  
               //ax.UserControl = true;  
            oXL.Quit();
            oXL=null;
          }   
          </script>
          </head>

          <body>
          <table width="100%" border="1" id="mytable">
            <tr>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
            </tr>
            <tr>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
            </tr>
            <tr>
               <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
            </tr>
            <tr>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
            </tr>
            <tr>
               <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
              <td>nihao</td>
            </tr>
          </table>
          <form id="form1" name="form1" method="post" action="">
            <label>
            <input type="button" name="Submit" value="導(dǎo)出excel" onclick="ExcelExport('mytable')" />
            </label>
          </form>
          <p>&nbsp;</p>
          </body>
          </html>

           

          posted @ 2012-02-28 18:16 哈希 閱讀(307) | 評(píng)論 (0)編輯 收藏

          http://www.wujianrong.com/archives/2007/05/20jspajax.html      簡(jiǎn)單用例
          http://www.ibm.com/developerworks/cn/web/wa-ajaxintro/          IBM—Ajax講解
          http://www.w3schools.com/ajax/ajax_example.asp                     Ajax—Example  W3CSchol



          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          ">

          <html>
          <head>
          <script src="ajax.js"></script>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
          <title>JSP Page using AJAX</title>
          </head>
          <body>

          <a onclick="sendRequest('GET','index.jsp')" href="#">Server Date Time:</a>
          <div id="ajax_res">Server Date Time will replace this text.</div>
          </body>
          </html>

          index.jsp
          <html>
          <body>
          <%=new java.util.Date()%>
          </body>
          </html>

          ajax.js
          function createRequestObject(){
          var req;
          if(window.XMLHttpRequest){
          //For Firefox, Safari, Opera
          req = new XMLHttpRequest();
          }
          else if(window.ActiveXObject){
          //For IE 5+
          req = new ActiveXObject("Microsoft.XMLHTTP");
          }
          else{
          //Error for an old browser
          alert('Your browser is not IE 5 or higher, or Firefox or Safari or Opera');
          }

          return req;
          }

          //Make the XMLHttpRequest Object
          var http = createRequestObject();

          function sendRequest(method, url){
          if(method == 'get' || method == 'GET'){
          http.open(method,url);
          http.onreadystatechange = handleResponse;
          http.send(null);
          }
          }

          function handleResponse(){
          if(http.readyState == 4 && http.status == 200){
          var response = http.responseText;
          if(response){
          document.getElementById("ajax_res").innerHTML = response;
          }
          }
          }
          run this application may be u get some clue

          posted @ 2012-02-24 23:30 哈希 閱讀(186) | 評(píng)論 (0)編輯 收藏

          假設(shè):
          1、你的頁(yè)面在Web-Root下,內(nèi)容為:  <div id="showMsg"></div><input type="text" id="userName" />,所用編碼為utf-8
          2、你的servlet為:  HelloWorldServlet.java  映射路徑為   servlet/helloWorldServlet
          步驟:
          1、引入jquery-1.6.4.min.js
          2、編寫id為userName的輸入框的點(diǎn)擊觸發(fā)函數(shù):
                $("#userName").keyup(function(){
                      $.ajax({
                            type: "post",
                            url: "servlet/helloWorldServlet?userName="+$(this).val(),
                            dataType: "json",
                            success: function(data){
                                  $("#showMsg").html(data.msg);//修改id為showMsg標(biāo)簽的html
                            }, error: function(){
                                  alert("請(qǐng)求出錯(cuò)");
                            }
                      })
                })
          3、后臺(tái)處理接收到的內(nèi)容:
                request.setCharactorEncoding("utf-8");
                String userName = request.getParameter("userName");
                response.setCharactorEncoding("utf-8");
                PringWriter out = response.getWriter();
                out.print("{\"msg\":\"你好~~"+userName+"!\"}");
          
          注意事項(xiàng):
          1、這里的編碼統(tǒng)一為utf-8
          2、請(qǐng)求路徑servlet/helloWorldServlet為相對(duì)路徑,因此你的頁(yè)面必須在項(xiàng)目的Web-Root下(也就是默認(rèn)的web文件夾下,名字可能因項(xiàng)目配置不同而改變)
          
          網(wǎng)上的 Jquery ajax Demo 大多都是基于php 
          很少 有java的 今天就把自己的Demo貼出來 和大家共同學(xué)習(xí)
          現(xiàn)在就  Jquery ajax 的 $.ajax(),$.post(),$.get();

          首先是  服務(wù)端的Servlet 演示這三個(gè)函數(shù)的用法對(duì)都是用的同一個(gè) 服務(wù)端
           package com.june.servlet;   
           
          import javax.servlet.http.HttpServlet;  
          import javax.servlet.http.HttpServletResponse;  
          import javax.servlet.http.HttpServletRequest;  
          import java.io.IOException;  
          import java.io.PrintWriter;  
          import javax.servlet.ServletException;  
           
          public class jqueryAjaxServer extends HttpServlet {  
               public jqueryAjaxServer(){  
                   super();  
               }  
               public void doGet(HttpServletRequest request,HttpServletResponse response)  
               throws IOException ,ServletException {  
                   response.setContentType("text/html;charset=utf-8");  
                   PrintWriter out=response.getWriter();  
                   String account=request.getParameter("account");  
                   if("iamcrzay".equals(account)){  
                       out.print("Sorry,the user is exist");  
                   }  
                   else{  
                       out.print("Congratulation,this accont you can use!!!!");  
                   }  
                   out.close();  
               }  
               public void doPost(HttpServletRequest request,HttpServletResponse response)  
               throws IOException ,ServletException {  
                   this.doGet(request, response);  
               }  

          下面是WEB.XML
          Xml代碼 
          <?xml version="1.0" encoding="UTF-8"?> 
          <web-app version="2.5"   
              xmlns="    xmlns:xsi="    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   
                  <servlet> 
                 <servlet-name>jqueryAjaxServer</servlet-name> 
                 <servlet-class>com.june.servlet.jqueryAjaxServer</servlet-class> 
              </servlet> 
                  <servlet-mapping> 
                 <servlet-name>jqueryAjaxServer</servlet-name> 
                 <url-pattern>/jqueryAjax</url-pattern> 
              </servlet-mapping> 
            <welcome-file-list> 
              <welcome-file>index.jsp</welcome-file> 
            </welcome-file-list> 
          </web-app> 

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app version="2.5"
           xmlns="
           xmlns:xsi=" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
            <servlet>
              <servlet-name>jqueryAjaxServer</servlet-name>
              <servlet-class>com.june.servlet.jqueryAjaxServer</servlet-class>
           </servlet>
                  <servlet-mapping>
              <servlet-name>jqueryAjaxServer</servlet-name>
              <url-pattern>/jqueryAjax</url-pattern>
           </servlet-mapping>
            <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
            </welcome-file-list>
          </web-app>

           

          下面是Jsp頁(yè)面
          第一個(gè)是 jqueryAjax.jsp  本頁(yè)使用的是$.ajax()
          Html代碼 
          <%@ page language="java"  pageEncoding="utf-8"%> 
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
          <html> 
            <head>    
              <title>jquery ajax</title>   
              <meta http-equiv="pragma" content="no-cache"> 
              <meta http-equiv="cache-control" content="no-cache"> 
              <meta http-equiv="expires" content="0">      
              <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> 
              <meta http-equiv="description" content="This is my page"> 
              <script src="js/jquery-1.2.6.js" type="text/javascript"></script> 
              <script language="javascript"> 
                   $(function(){  
                         $('.sumbit').click(function(){  
                         if($('#account').val().length==0){  
                             $('.hint').text("用戶名不能位空").css({"background-color":"green"});   
                         }  
                         else{  
                         $.ajax({  
                          
          url:'jqueryAjax',  
                           data:{account:$('#account').val()},  
                           error:function(){  
                           alert("error occured!!!");  
                           },  
                           success:function(data){  
                            $('body').append("<div>"+data+"</div>").css("color","red");  
                  
                           }  
                             
                         });}  
                         });  
                         });  
                             
                   
                       
              </script> 
            </head> 
              
            <body> 
                          <h3 align="center">jquery AjaX</h3> 
                          <hr> 
                          <label>請(qǐng)輸入用戶名 :</label> 
                          <input id="account" name="account" type="text"> 
                          <input class="sumbit" type="button" value="檢測(cè)"> 
                          <div class="hint"> 
                          </div> 
            </body> 
          </html> 

          <%@ page language="java"  pageEncoding="utf-8"%>
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
          <html>
            <head> 
              <title>jquery ajax</title>
           <meta http-equiv="pragma" content="no-cache">
           <meta http-equiv="cache-control" content="no-cache">
           <meta http-equiv="expires" content="0">   
           <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
           <meta http-equiv="description" content="This is my page">
           <script src="js/jquery-1.2.6.js" type="text/javascript"></script>
           <script language="javascript">
                $(function(){
                      $('.sumbit').click(function(){
                      if($('#account').val().length==0){
                          $('.hint').text("用戶名不能位空").css({"background-color":"green"});
                      }
                      else{
                      $.ajax({
                        url:'jqueryAjax',
                        data:{account:$('#account').val()},
                        error:function(){
                        alert("error occured!!!");
                        },
                        success:function(data){
                         $('body').append("<div>"+data+"</div>").css("color","red");
            
                        }
                       
                      });}
                      });
                      });
                          
             
                 
           </script>
            </head>
           
            <body>
                          <h3 align="center">jquery AjaX</h3>
                          <hr>
                          <label>請(qǐng)輸入用戶名 :</label>
                          <input id="account" name="account" type="text">
                          <input class="sumbit" type="button" value="檢測(cè)">
                          <div class="hint">
                          </div>
            </body>
          </html>

           

          第二個(gè)用的是  $.post()

          Html代碼 
          <%@ page language="java"  pageEncoding="utf-8"%> 
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
          <html> 
            <head>    
              <title>jquery ajax</title>   
              <meta http-equiv="pragma" content="no-cache"> 
              <meta http-equiv="cache-control" content="no-cache"> 
              <meta http-equiv="expires" content="0">      
              <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> 
              <meta http-equiv="description" content="This is my page"> 
              <script src="js/jquery-1.2.6.js" type="text/javascript"></script> 
              <script language="javascript"> 
                   $(function(){  
                       $('.sumbit').click(  
                        function(){  
                          if($('#account').val().length==0){  
                              $('.hint').text("The account is cant't be null").css({"color":"red","background-color":"yellow"});  
                          }  
                          else{  
                          $.post("jqueryAjax","account="+$('#account').val(),function(data){  
                             $('.hint').text(data).css({"color":"red","background-color":"yellow"});  
                          })  
                          }  
                       });  
                   });             
              </script> 
            </head> 
              
            <body> 
                          <h3 align="center">jquery Ajax</h3> 
                          <hr> 
                          <label>請(qǐng)輸入用戶名 :</label> 
                          <input id="account" name="account" type="text"> 
                          <input class="sumbit" type="button" value="檢測(cè)"> 
                          <div class="hint"> 
                          </div> 
            </body> 
          </html> 

          <%@ page language="java"  pageEncoding="utf-8"%>
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
          <html>
            <head> 
              <title>jquery ajax</title>
           <meta http-equiv="pragma" content="no-cache">
           <meta http-equiv="cache-control" content="no-cache">
           <meta http-equiv="expires" content="0">   
           <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
           <meta http-equiv="description" content="This is my page">
           <script src="js/jquery-1.2.6.js" type="text/javascript"></script>
           <script language="javascript">
                $(function(){
                    $('.sumbit').click(
                     function(){
                       if($('#account').val().length==0){
                           $('.hint').text("The account is cant't be null").css({"color":"red","background-color":"yellow"});
                       }
                       else{
                       $.post("jqueryAjax","account="+$('#account').val(),function(data){
                          $('.hint').text(data).css({"color":"red","background-color":"yellow"});
                       })
                       }
                    });
                });       
           </script>
            </head>
           
            <body>
                          <h3 align="center">jquery Ajax</h3>
                          <hr>
                          <label>請(qǐng)輸入用戶名 :</label>
                          <input id="account" name="account" type="text">
                          <input class="sumbit" type="button" value="檢測(cè)">
                          <div class="hint">
                          </div>
            </body>
          </html>

           

          第三個(gè)是用的$.get()

          Html代碼 
          <%@ page  pageEncoding="utf-8"%> 
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
          <html> 
            <head>     
              <title>jquery get</title> 
                
              <meta http-equiv="pragma" content="no-cache"> 
              <meta http-equiv="cache-control" content="no-cache"> 
              <meta http-equiv="expires" content="0">      
              <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> 
              <meta http-equiv="description" content="This is my page"> 
              <script src="js/jquery-1.2.6.js" type="text/javascript"></script> 
              <script type="text/javascript"> 
                   $(function(){  
                          $('.sumbit').click(function(){  
                                if($('#account').val().length==0){  
                                   $('.hint').html("用戶名不能位空!!!").css({"color":"#ffoo11","background":"blue"});  
                                }  
                                else{  
                                    $.get("jqueryAjax","account="+$('#account').val(),  
                                         function(data){  
                                          $('.hint').html(data).css({"color":"#ffoo11","background":"green"});  
                                    });  
                                }  
                          });  
                   });  
              </script> 
           
            </head> 
              
            <body> 
                  <h3 align="center">jquery AjaX</h3> 
                          <hr> 
                          <label>請(qǐng)輸入用戶名 :</label> 
                          <input id="account" name="account" type="text"> 
                          <input class="sumbit" type="button" value="檢測(cè)"> 
                          <div class="hint"> 
                          </div> 
            </body> 
          </html> 

          <%@ page  pageEncoding="utf-8"%>
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
          <html>
            <head>  
              <title>jquery get</title>
             
           <meta http-equiv="pragma" content="no-cache">
           <meta http-equiv="cache-control" content="no-cache">
           <meta http-equiv="expires" content="0">   
           <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
           <meta http-equiv="description" content="This is my page">
           <script src="js/jquery-1.2.6.js" type="text/javascript"></script>
           <script type="text/javascript">
                $(function(){
                       $('.sumbit').click(function(){
                             if($('#account').val().length==0){
                                $('.hint').html("用戶名不能位空!!!").css({"color":"#ffoo11","background":"blue"});
                             }
                             else{
                                 $.get("jqueryAjax","account="+$('#account').val(),
                                      function(data){
                                       $('.hint').html(data).css({"color":"#ffoo11","background":"green"});
                                 });
                             }
                       });
                });
           </script>

            </head>
           
            <body>
                  <h3 align="center">jquery AjaX</h3>
                          <hr>
                          <label>請(qǐng)輸入用戶名 :</label>
                          <input id="account" name="account" type="text">
                          <input class="sumbit" type="button" value="檢測(cè)">
                          <div class="hint">
                          </div>
            </body>
          </html>

           
          http://iamcrzay.iteye.com/blog/237940 
           
           
           
           

          posted @ 2012-02-24 16:16 哈希 閱讀(4002) | 評(píng)論 (3)編輯 收藏

          1、將數(shù)組轉(zhuǎn)化成字符串,用特殊字符如“|”將數(shù)組的元素隔開,用普通的字符串參數(shù)傳遞

          2、使用json方式傳遞參數(shù)

          解析

          C#后臺(tái)得到的是個(gè)string
          string objStr = HttpContext.Current.Request["objStr"];

          objStr內(nèi)容([{"0": "a", "1": "b", "2": "c", "3": "d"}, {"0": "aa", "1": "bb", "2": "cc", "3": "dd"}{"0": "aa", "1": "bb"}])


          /// <summary>
            /// 從JS數(shù)組中解析出JSON對(duì)象返回該對(duì)象的字符串表示
            /// </summary>
            /// <param name="ArrayStr"></param>
            /// <returns></returns>
            private static string GetJsonStr(string ArrayStr)
            {
            //ArrayStr="[{'0': 'a', '1': 'b', '2': 'c', '3': 'd'},{'0': 'aa', '1': 'bb', '2': 'cc', '3': 'dd'},{'0': 'aa', '1': 'bb'}]";
            string StrJson = ArrayStr;

            //將"[{"和"}]"去除;
            //StrJson="'0': 'a', '1': 'b', '2': 'c', '3': 'd'},{'0': 'aa', '1': 'bb', '2': 'cc', '3': 'dd'},{'0': 'aa', '1': 'bb'";  
            StrJson = StrJson.Substring(2, StrJson.Length - 4);

            //將“},{”替換為“|”便于分割成數(shù)組
            //StrJson="'0': 'a', '1': 'b', '2': 'c', '3': 'd'|'0': 'aa', '1': 'bb', '2': 'cc', '3': 'dd'|'0': 'aa', '1': 'bb'";  
            StrJson = StrJson.Replace("},{", "|");  
             
            //以“|”為分隔符將每個(gè)JSON對(duì)象分割成字符串
            /*結(jié)果為:strjson[0]="'0': 'a', '1': 'b', '2': 'c', '3': 'd'";
            strjson[1]="'0': 'aa', '1': 'bb', '2': 'cc', '3': 'dd'";
            strjson[2]="'0': 'aa', '1': 'bb'";*/
            return StrJson.Split('|');
            }

          posted @ 2012-02-20 22:16 哈希 閱讀(209) | 評(píng)論 (0)編輯 收藏

          ask.jsp

          <script language="javascript" type="text/javascript">
          function Open()
          {

          window.open('<%=path%>/jsp/answer.jsp' ,'_blank','top=250,left=300,width=500 height=100');
          }
          </script>

            <body>
           <form   onsubmit= "return  new_window(); " >
            <input type="text" name="tbValue"><a href="javascript:" onclick="Open();">Open
          http://www.dwww.cn </a>
            
           </form>
            </body>

          answer.jsp

           <script language="javascript" type="text/javascript">
            function SetValue(value)
            {
            self.opener.document.all("tbValue").value=value;
            self.close();
            }
            </script>

           
           
          <body>
              Values:<br/>
          <a href="javascript:SetValue('1')">value 1</a><br/>
          <a href="javascript:SetValue('2')">value 2</a>

            </body>

           





          posted @ 2012-02-19 12:56 哈希 閱讀(176) | 評(píng)論 (0)編輯 收藏

          a href 不讓頁(yè)面跳轉(zhuǎn)

          不可以跳轉(zhuǎn)
          <a href="javascript:;" onclick="javascript:ToUrl('http://www.jingzhengli.cn');">
          location.href不跳轉(zhuǎn)測(cè)試1</a>  
          <a href="javascript:void(0);"
          onclick="javascript:ToUrl('http://www.jingzhengli.cn');">
          location.href不跳轉(zhuǎn)測(cè)試2</a>  


          可以跳轉(zhuǎn)
          <a href="javascript:void(0);"
          onclick="javascript:ToUrl('http://www.jingzhengli.cn');return false;">
          location.href不跳轉(zhuǎn)測(cè)試3</a>  
          <a href="#" onclick="javascript:ToUrl('http://www.jingzhengli.cn');">
          location.href不跳轉(zhuǎn)測(cè)試4</a>  
          <a href="###" onclick="javascript:ToUrl('http://www.jingzhengli.cn');">
          location.href不跳轉(zhuǎn)測(cè)試5</a> 
          本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/muzai/archive/2010/11/22/6026786.aspx

          posted @ 2012-02-17 13:22 哈希 閱讀(1158) | 評(píng)論 (0)編輯 收藏


          第一種:
              <script language="javascript" type="text/javascript">
                     window.location.href=
          "login.jsp?backurl="+window.location.href;
              </script>

          第二種:
              <script language=
          "javascript">
          alert(
          "返回");
          window.history.back(-1);
             </script>

          第三種:
             <script language=
          "javascript">
          window.navigate(
          "top.jsp");
            </script>

          第四種:
             <script language=
          "JavaScript">
                    self.location='top.htm';
             </script>

          第五種:
             <script language=
          "javascript">
                    alert(
          "非法訪問!");
                    top.location='xx.jsp';
             </script>

          posted @ 2012-02-16 23:09 哈希 閱讀(163) | 評(píng)論 (0)編輯 收藏

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
          <HTML>
          <HEAD>
          <TITLE> 顯示隱藏列 </TITLE>
          <SCRIPT LANGUAGE="JavaScript">
          <!--
          function setHiddenCol(oTable,iCol)//Writed by QQ:190988779 at 2007-7-24 11:14:09
          {
              for (i=0;i < oTable.rows.length ; i++)
              {
                  oTable.rows[i].cells[iCol].style.display = oTable.rows[i].cells[iCol].style.display=="none"?"block":"none";
              }
          }
          function setHiddenRow(oTable,iRow)//Writed by QQ:190988779 at 2007-7-24 11:14:09
          {
              oTable.rows[iRow].style.display = oTable.rows[iRow].style.display == "none"?"block":"none";
          }
          //-->
          </SCRIPT>
          </HEAD>

          <BODY>
          <TABLE id="Table1" cellSpacing="1" cellPadding="1" border="1">

          <TR> <TD width="20%">00</TD> <TD width="20%" bgcolor="#E3E3E3">01</TD> <TD width="20%">02</TD></TR>
          <TR> <TD width="20%" bgcolor="red">10</TD> <TD width="20%" bgcolor="green">11</TD> <TD width="20%" bgcolor="red">12</TD></TR>
          <TR> <TD width="20%">20</TD> <TD width="20%" bgcolor="#E3E3E3">21</TD> <TD width="20%">22</TD></TR>
          </TABLE> </P>


          <INPUT id="btnHiddenCol" type="button" value="顯示/隱藏第2列" name="btnHiddenCol" onclick="setHiddenCol(document.getElementById('Table1'),1)">
          <INPUT id="btnHiddenRow" type="button" value="顯示/隱藏第2行" name="btnHiddenRow" onclick="setHiddenRow(document.getElementById('Table1'),1)">
          </BODY>
          </HTML>

          posted @ 2012-02-15 11:08 哈希 閱讀(866) | 評(píng)論 (0)編輯 收藏

          oracle數(shù)據(jù)庫(kù)的配置

          一、Oracle的配置

          1、配置net manager

            依次選擇開始—>Oracle – OraHome92>Configuration and Migration Tools>Net Manager

          選擇本地—>服務(wù)命名,點(diǎn)擊左側(cè)綠色加號(hào) 

          輸入Net服務(wù)名 172.30.4.205_ora91 點(diǎn)擊下一步 

          選擇TCP/IPInternet協(xié)議) 點(diǎn)擊下一步 

          輸入主機(jī)名172.30.4.205 點(diǎn)擊下一步 

          選擇(Oracle8i或更高版本)服務(wù)名:ora91  點(diǎn)擊下一步 

          點(diǎn)擊測(cè)試 

          選擇更改登陸,輸入用戶名xiecha,口令xiecha 

          點(diǎn)擊確定,出現(xiàn)測(cè)試成功后選擇關(guān)閉

          點(diǎn)擊完成 

          保存網(wǎng)絡(luò)配置 
          參見網(wǎng)址:http://wenku.baidu.com/view/7685da64783e0912a2162aa9.html

          posted @ 2012-02-09 11:56 哈希 閱讀(157) | 評(píng)論 (0)編輯 收藏

          僅列出標(biāo)題
          共11頁(yè): 上一頁(yè) 1 2 3 4 5 6 7 8 9 下一頁(yè) Last 
          主站蜘蛛池模板: 资源县| 陇川县| 鸡东县| 丰顺县| 杭锦后旗| 榆社县| 普宁市| 娱乐| 闽侯县| 宜川县| 塘沽区| 涡阳县| 通许县| 宁陵县| 安岳县| 满城县| 农安县| 清河县| 北京市| 河东区| 色达县| 嘉鱼县| 登封市| 浙江省| 开鲁县| 喜德县| 东山县| 育儿| 望江县| 永登县| 鄂尔多斯市| 奇台县| 光山县| 泾川县| 荥阳市| 资源县| 广元市| 遵义县| 田东县| 富川| 额尔古纳市|