将code贴出 如何将第二个td的内容提出就是右则的内容 1楼贴不下的在2楼
lessonRequest.htm
<%@LANGUAGE="JavaScript"%>
<SCRIPT LANGUAGE="javaScript">
var xmlHttp;
function createXmlHttpRequest(){
if(window.ActiveXObject)
{
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest)
{
xmlHttp=new XMLHttpRequest();
}
}function doRequestUsingGet()
{
createXmlHttpRequest();
var url="Lessons1.htm"
xmlHttp.open("get",url,true);
xmlHttp.onreadystatechange=handleRequest;
        xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("charset","gb2312"); 
xmlHttp.send(null);
}function handleRequest()
{
if(xmlHttp.readyState==4)
{
if(xmlHttp.status==200)
{
showInfo();
                        
}
}
}function showInfo()
{
var responseText=xmlHttp.responseText;
re=/<td[^>]*>.*<\/td>/igm;
LessonText=responseText.match(re);
document.getElementById("Lessons").innerHTML=LessonText;
}
</SCRIPT><input type=button value=callback onClick="doRequestUsingGet()" />
<div id="Lessons"></div>

解决方案 »

  1.   

    Lessons1.htm<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!-- saved from url=(0037)ASP JavaScript Lessons1.htm -->
    <HTML><HEAD><TITLE>ASP JavaScript Lessons</TITLE><LINK 
    href="ASP JavaScript Lessons1.files/style.css" type=text/css rel=stylesheet>
    <SCRIPT language=JavaScript 
    src="ASP JavaScript Lessons1.files/window.js"></SCRIPT><META http-equiv=Content-Type content="text/html; charset=gb2312">
    <META 
    content="asp,active server pages,javascript,jscript,vbscript,asp javascript,javascript asp,new string,escape characters" 
    name=Keywords>
    <META 
    content="Free lessons on using JavaScript as your primary scripting language for ASP Active Server Pages.  Learn how to write ASP Javascript." 
    name=Description>
    <META content="MSHTML 6.00.2900.5726" name=GENERATOR></HEAD>
    <BODY>
    <P>
    <TABLE cellSpacing=0 cellPadding=0 border=0>
      <TBODY>
      <TR>
        <TD vAlign=top width=126 
        background="ASP JavaScript Lessons1.files/leftBG.jpg">
          <P><STRONG>QUICK REFERENCE</STRONG><BR><BR><A 
          onmouseover="window.status='Home Page'; return true;" title="Home Page" 
          onmouseout="window.status=''; return true;" 
          href="http://aspjavascript.com/default.asp">Home</A><BR><BR><STRONG>Section 
          01</STRONG><BR><A 
          onmouseover="window.status='A General Overview'; return true;" 
          title="A General Overview" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons1.htm">Lesson 01</A><BR>
          <A 
          onmouseover="window.status='Escape Characters'; return true;" 
          title="Escape Characters" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons2.htm">Lesson 02</A><BR><A 
          onmouseover="window.status='The new String( ) Constructor'; return true;" 
          title="The new String( ) Constructor" 
          onmouseout="window.status=''; return true;" 
          href="ASP JavaScript Lessons3.htm">Lesson 03</A><BR>
          <A 
          onmouseover="window.status='Using VBScript with JavaScript'; return true;" 
          title="Using VBScript with JavaScript" 
          onmouseout="window.status=''; return true;" 
          href="ASP JavaScript Lessons4.htm">Lesson 04</A><BR>
          
      

  2.   

    <A 
          onmouseover="window.status='Bringing It Together'; return true;" 
          title="Bringing It Together" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons5.htm">Lesson 
          05</A><BR><BR><STRONG>Section 02</STRONG><BR><A 
          onmouseover="window.status='The Response Methods'; return true;" 
          title="The Response Methods" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons6.htm">Lesson 06</A><BR><A 
          onmouseover="window.status='The Response Properties'; return true;" 
          title="The Response Properties" 
          onmouseout="window.status=''; return true;" 
          href="ASP JavaScript Lessons7.htm">Lesson 07</A><BR><A 
          onmouseover="window.status='The Request Collections'; return true;" 
          title="The Request Collections" 
          onmouseout="window.status=''; return true;" 
          href="ASP JavaScript Lessons8.htm">Lesson 08</A><BR><A 
          onmouseover="window.status='Response.Cookies and Request.Cookies'; return true;" 
          title="Response.Cookies and Request.Cookies" 
          onmouseout="window.status=''; return true;" 
          href="ASP JavaScript Lessons9.htm">Lesson 
          09</A><BR><BR><STRONG>Section 03</STRONG><BR><A 
          onmouseover="window.status='Global ASA'; return true;" title="Global ASA" 
          onmouseout="window.status=''; return true;" 
          href="asp javascript lessons10.htm">Lesson 10</A><BR><A 
          onmouseover="window.status='Application Object'; return true;" 
          title="Application Object" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons11.htm">Lesson 11</A><BR><A 
          onmouseover="window.status='Session Object'; return true;" 
          title="Session Object" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons12.htm">Lesson 12</A><BR><A 
          onmouseover="window.status='Include Files'; return true;" 
          title="Include Files" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons13.htm">Lesson 
          13</A><BR><BR><STRONG>Section 04</STRONG><BR><A 
          onmouseover="window.status='Server Object';  return true;" 
          title="Server Object" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons14.htm">Lesson 14</A><BR><A 
          onmouseover="window.status='ASPError Object'; return true;" 
          title="ASPError Ojbect" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons15.htm">Lesson 
          15</A><BR><BR><STRONG>Section 05</STRONG><BR><A 
          onmouseover="window.status='Making A Connection'; return true;" 
          title="Making A Connection" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons16.htm">Lesson 16</A><BR><A 
          onmouseover="window.status='Using A Recordset'; return true;" 
          title="Using A Recordset" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons17.htm">Lesson 17</A><BR><A 
          onmouseover="window.status='More About Recordsets'; return true;" 
          title="More About Recordsets" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons18.htm">Lesson 18</A><BR><A 
          onmouseover="window.status='Adding and Updating'; return true;" 
          title="Adding and Updating" onMouseOut="window.status=''; return true;" 
          href="ASP JavaScript Lessons19.htm">Lesson 19</A><BR><A 
          onmouseover="window.status='A Word About Date/Time'; return true;" 
          title="A Word About Date/Time" onMouseOut="window.status=''; return true;" 
          href="asp javascript lessons20.htm">Lesson 20</A><BR><BR>
          <SCRIPT type=text/javascript><!--
    google_ad_client = "pub-7368299394621738";
    google_ad_width = 120;
    google_ad_height = 600;
    google_ad_format = "120x600_as";
    google_ad_type = "text_image";
    google_ad_channel ="";
    google_color_border = "333333";
    google_color_bg = "000000";
    google_color_link = "FFFFFF";
    google_color_url = "999999";
    google_color_text = "CCCCCC";
    //--></SCRIPT>      <SCRIPT src="ASP JavaScript Lessons1.files/show_ads.js" 
          type=text/javascript>
    </SCRIPT>
          </P><IMG height=2 src="ASP JavaScript Lessons1.files/spacer.gif" 
          width=126> </TD>
        <TD vAlign=top width=700 
        background="ASP JavaScript Lessons1.files/rightBG.jpg"><FONT 
          style="BACKGROUND-COLOR: #ffffff">
          <H1>A General Overview</H1>
          <P><STRONG>Before We Start:</STRONG> </P>
          <P>ASP stands for Active Server Pages. ASP comes from Microsoft and it 
          promises a language neutral platform on which to develop dynamic web 
          pages. </P>
          <P>Your Scripts are written as plain text and stored in files with the 
          .asp extension. When called upon, your script goes through the ASP script 
          engine, which combines your scripts with information from the web surfer, 
          possibly a database, and other sources as you see appropriate. </P>
          <P>Based on the presumptions laid out on the home page, I assume you 
          already know how to create text files with an .asp extension. I also 
          assume you already know how to place your files into a virtual folder. 
          There is a lot of documentation on how to do these things, but the subject 
          matter is beyond the scope of this web site. </P>
          <P><STRONG>Get Started:</STRONG> </P>
          <P>The best way to get into this lesson is simply to dive right into the 
          script. </P>
          <P>Below is the ASP Script for Lesson 01.<BR></P><PRE>&lt;%@LANGUAGE="JavaScript"%&gt;
    &lt;%
    Response.Write("&lt;HTML&gt;")
    Response.Write("&lt;BODY&gt;")
    Response.Write("Hello World&lt;BR&gt;")
    Response.Write("&lt;/BODY&gt;")
    Response.Write("&lt;/HTML&gt;")
    %&gt;
    </PRE>
          <P><A href="javascript:lesson('01','01')">Click Here</A> to run the script 
          in a new window. </P>
          <P><STRONG>Tags:</STRONG> </P>
          <P>This is a pretty simple example. My bet is that you already get it. 
          Have you noticed that ASP tags are similar to HTML tags? There is a 
          difference. <NOBR>&lt;%ASP Goes Here.%&gt;</NOBR> The ASP tags use a 
          percent sign. </P>
          <P><STRONG>@LANGUAGE:</STRONG> </P>
          <P>The @LANGUAGE attribute is set to "JavaScript". That means ASP will run 
          our scripts through the JavaScript (JScript) script engine. </P>
          <P>Most servers are set by default to use VBScript. We can change the 
          default language for a single page by using the @LANGUAGE attribute. 
          @LANGUAGE must be set BEFORE any other ASP commands. So, it's a good idea 
          to put @LANGUAGE right at the very top, even before your HTML headers. 
          @LANGUAGE can only be set ONCE in any particular script. It should also 
          stand alone; don't put any other command inside the same set of tags. 
          </P><STRONG>Misc. Notes:</STRONG> 
          <P><I>Response</I> is an ASP object (Not to be confused with JavaScript 
          objects) and <I>Write</I> is an ASP method (not to be confused with 
          JavaScript methods). <I>Response</I> gets its own lesson later on. </P>
          <P>The last thing we need to notice on this script is the difference 
          between the ASP script and the resulting HTML Script. </P>
          <P>Below is the HTML source code as seen on the client side. </P><PRE>&lt;HTML&gt;&lt;BODY&gt;Hello World&lt;BR&gt;&lt;/BODY&gt;&lt;/HTML&gt;
    </PRE>
          <P>The Client Side output is all on one line. If you haven't already, 
          click the link to run the script and then <I>View Source Code</I>. You 
          will see that the entire HTML text is one unbroken line. That's bad. On 
          lager pages, it will make the HTML output difficult to read. Trust me; you 
          can't find bugs if you can't even make heads or tails of what you're 
          putting out to the client. </P>
          <P>In Lesson 02 we will fix that problem. </P>
          <P>Next up.... <A 
          href="ASP JavaScript Lessons2.htm">lesson02.asp</A> </P></FONT><!-- SiteSearch Google -->
          <FORM action=http://www.google.com/custom method=get target=_top>
          <TABLE bgColor=#cccccc border=0>
            <TBODY>
            <TR>
              <TD vAlign=top noWrap align=left height=32><A 
                href="http://www.google.com/"><IMG alt=Google 
                src="ASP JavaScript Lessons1.files/Logo_25gry.gif" 
                border=0></IMG></A> </TD>
              <TD noWrap><INPUT type=hidden value=aspjavascript.com 
                name=domains></INPUT> <INPUT maxLength=255 size=40 name=q></INPUT> <INPUT type=submit value=Search name=sa></INPUT> </TD></TR>
            <TR>
              <TD>ghhgjj</TD>
              <TD noWrap>
                <TABLE>
                  <TBODY>
                  <TR>
                    <TD><INPUT type=radio value="" name=sitesearch></INPUT> <FONT 
                      color=#000000 size=-1>Web</FONT> </TD>
                    <TD><INPUT type=radio CHECKED value=aspjavascript.com 
                      name=sitesearch></INPUT> <FONT color=#000000 
                      size=-1>aspjavascript.com</FONT> </TD></TR></TBODY></TABLE><INPUT 
                type=hidden value=pub-7368299394621738 name=client></INPUT> <INPUT 
                type=hidden value=1 name=forid></INPUT> <INPUT type=hidden 
                value=ISO-8859-1 name=ie></INPUT> <INPUT type=hidden 
                value=ISO-8859-1 name=oe></INPUT> <INPUT type=hidden 
                value=GALT:#E9382F;GL:1;DIV:#CCCCCC;VLC:7E3939;AH:center;BGC:FFFFFF;LBGC:FF3333;ALC:E9382F;LC:E9382F;T:000000;GFNT:7E3939;GIMP:7E3939;FORID:1; 
                name=cof></INPUT> <INPUT type=hidden value=en name=hl></INPUT> 
            </TD></TR></TBODY></TABLE></FORM><!-- SiteSearch Google --></TD></TR></TBODY></TABLE></P><FONT 
    size=1>Copyright James Clark 2005</FONT> </BODY></HTML>
      

  3.   

    document.getElementsByTagName('table')[0].getElementsByTagName('td')[1].innerText
      

  4.   

    ls的这样不行好不好 返回的是text格式的 根本没这个吧
      

  5.   

    你不是要里面的内容吗
    你要里面的HTML,那就innerHTML就好了