2個表格拼成一個!

上一篇 / 下一篇  2008-08-08 15:53:58

<table width="20%" cellspacing="0" cellpadding="0" border="0" align="left" rules="all" class="tbldata">
!ig[BO C0                  <tr class="headtxtGroupOrg">Ruby Community{9ld3^ tM7PlF0E
                    <td width="20%" height="29" align="left">
&p{CK\r6Y0                      <span class="font1">&nbsp;組名</span>
,?"_K@9dy$x%GX0                    </td>
YM#U3Ta)f a'P0                  </tr>Ruby CommunityTWGgpC)\z^
                <% for info in @mail_group %>
nU C(F(G'O"L0                  <tr>Ruby Community&w3DKNR`2S
                    <td width="20%" height="25px" id="<%=info.sort_no%>" name="<%=info.sort_no%>" class="td" style="cursor:pointer" nClick="funcBgcolor(this.id,'<%=@mail_group.length%>','<%=info.id.to_s%>','<%=info.updated_no.to_s%>','<%=@bgcolor%>')" bgColor="<%=@bgcolorif info.id.to_s == params[:hidGroupID].to_s %>">Ruby Community'shy#p*f-W8`$^~j8G
                      &nbsp;<%=DSP.Label("gname","8",info.mail_group_name,"0") %>Ruby CommunityLW)n'~@ BNH$d9P
                    </td>Ruby Community*Ga$@[.l'aTp
                  </tr>Ruby Communityh)m6[8F9Ni,D!}8jt
                <% end %>Ruby Community"cS J.U F!h
                <% if @mgpLen < @madsslen %>Ruby CommunityW _9]9u}Ql~_S
                   <% for i in1..@madsslen- @mgpLen %>Ruby Community9U/c?@b(UR FG`
                   <tr>Ruby Community:x)wUO%vR&O E
                     <td width="20%" height="25px"></td>Ruby CommunityJf|Li*Q;G C
                   </tr>
8mtO3ZPgnF n&z0                   <% end %>
{Z&j,Z7Bo4E0                <% end %>Ruby Community7ycG#OQ
                </table>Ruby Community Z4C p4l$Mi~c
                <table id="t1" width="80%" border="0" cellspacing="0" cellpadding="0" align="left" class="tbldata">
N9LSa e)c6bmaK0                  <tr class="headtxtGroupOrg">Ruby CommunityYC#ll i'F8i
                    <td width="38%" height="29" align="left">Ruby Community6n5@i$Hn8i4q-Y(g _
                      <span class="font1">姓名</span>Ruby Community2C;}%GH+h-OG0k9c/]
                    </td>
|_}&l}uASS)K0                    <td width="20%" align="left" class="font1">Ruby Community2u2X\0Q5rJ,B v
                      &nbsp;敬称
$V9g!}.J9_!PU0                    </td>Ruby Communityfiz [g {t
                    <td width="25%" align="left" class="font1">Ruby Communityb/HC{x@"B i.?5O
                      名字讀音
bI:m_K$gjW0                    </td>Ruby Community"A)ax dONL9f
                    <td align="left" class="font1">
[Y7d5LW$IuUx0                      &nbsp;内外Ruby Communityaok5Z9Jz M.c
                    </td>
)\6^t1B#Yv r^x0                  </tr>
2L*`#Jj {)zIB"n!u:Rs)`0                <% if @mail_addresses != nil and @mail_addresses.length > 0  then %>
)IV3`2Llc*Nz0                  <% for info in @mail_addresses %>
g2g}En1u2JK/u0                    <% info.kana_name = "" if info.kana_name == nil %>Ruby Community];_lAWR Y jz
                    <% info.keyi_name = "0" if info.keyi_name == nil %>Ruby CommunityeR,W^ RV
                    <% info.office_mail_address = "" if info.office_mail_address == nil %>Ruby Communityh3k!zg1t5e;`0S
                    <% info.mail_address = "" if info.mail_address == nil %>Ruby Community'Lr2b e;Q.~l
                    <input id="add_update_no_<%=info.id.to_s%>" name="add_update_no_<%=info.id.to_s%>" type="hidden" value="<%=info.updated_no.to_s%>">
|"n]&E"i]6k0                  <tr class="trBgcolor">
NA7`2R*r;P4|0                    <td height="25px" class="td" id=link2>Ruby Community:enhze`%^
                      &nbsp;<a href="/sk1406/linkto?method=index" nclick="funcLink('<%=info.id%>');return false;"><%=DSP.LabelBusyo("gname","13",info.name,"0",params['address' + info.id.to_s]) %></a>
sR]{0\f#S(c0                    </td>
$Fq*EwdM/~c0                    <td height="25px" class="td">Ruby Community/kU1Hxqd$z-\\Z
                      &nbsp;<%= '閣下' if info.keyi_name == '1' %><%= '閣下' if info.keyi_name == '2' %>Ruby CommunityRV&C m WOWSL%P
                    </td>
;@)d'G;b5L;U-}.Z0                    <td height="25px" class="td">Ruby Community2q o8IL*e,\Vw
                      <%=DSP.Label("kananame","8",info.kana_name,"0") %>&nbsp;
r\2E P;f&^1M5aBoB)^$h `0                    </td>
;\NdX9k0D4T7\0                    <td class="td" height="25px">Ruby Community*G qkl.wt5n
                      <% if info.office_mail_address.length > 0 and info.mail_address.length > 0 %>Ruby Community0j8w"Bq X
                        <img src="/images/lab_inside.gif" width="18" height="15"><img src="/images/lab_outside.gif" width="17" height="15"><% elsif info.office_mail_address.length > 0 %>Ruby Communityad)f8zA
                        <img src="/images/lab_inside.gif" width="18" height="15"><% elsif info.mail_address.length > 0 %>Ruby Communityw8i-Lo o;f|P
                           <img src="/images/lab_outside.gif" width="17" height="15">Ruby Community:jBYJ;a7aNl
                      <% else %>
'x?)ac-}5p:l0                         &nbsp;Ruby Community(G d/[2K7iEYG
                      <% end %>
9]M"}+\8xU0                    </td>
8st:xsV0                  </tr><% end %>Ruby Community9oH/jW|z(s#uc4l
                  <% end %>Ruby CommunityM4]"Gb1K)L*F@{;S e
                  <% if @mgpLen > @madsslen %>
2\6@ Ms`,S0                     <% for i in1..@mgpLen- @madsslen %>
b*o*T4s2B:R0                  <tr class="trBgcolor">Ruby Community/]n H(}#C!v`@+V
                    <td width="20%" height="25px" class="td" id=link2></br></td>
mj rG$`Z5^0                    <td width="20%" height="25px" class="td"></br></td>Ruby Community_ JWl? \1q
                    <td class="td" height="25px" class="td"></br></td>Ruby CommunityT*h(L_V2J$I
                    <td class="td" height="25px" class="td"></br></td>Ruby Community3r N'e$mq h4K1l
                  </tr>
]1w-`/xG0w1o {0                     <% end %>
(S0nV k3WO/Y$el0                  <% end %>Ruby Communityjog#sZ.S&} T3M~
                </table>

中間的是數據部分,大家根據不通的需要修改!

==================================

組名                  姓名      名字讀音       敬稱      內外

組1 (選中)     張三1    zhangsan                    內部

組2                  張三2    zhangsan      閣下      內部

組3                  張三3    zhangsan      閣下      內部

組4                  張三4    zhangsan                    外部

 組1 被選中 有4個人

如果組2被選中

組名                  姓名      名字讀音       敬稱      內外

組1                   李四1       lisi                             內部

組2   (選中)    李四2       lisi               閣下      內部

組3                   李四3       lisi               閣下      內部

組4                   李四4       lisi                             外部

js:(funcBgcolor)

function funcBgcolor(tdid,len,clickid,udpno,bgcolor){Ruby Community4^1S.o-y2{xM C
  document.myform.hidGroupID.value = clickid;Ruby CommunityLU V JJJ
  document.myform.updated.value = udpno;Ruby Community2D`8r-O!cA/Wf
  for (var i = 1; i <= len; i++) {
&l j[BBZ0    document.getElementById(i).bgColor = '#FFFFFF';                            #白色
F*I#^0H8Z o0  }Ruby Community7jjtfF
  document.getElementById(tdid).bgColor = bgcolor;                             #bgcolor:一種顏色Ruby Community&iESt']-e}N
  submitForm("/sk1405/linkto?method=groupclick");                             # submitForm   form.action=“"  ;form.submit()
8]-E%\6q.?%^R0}

function funcLink(addressid){Ruby Community;aF'Dmjgu;m/W
  document.myform.hidAddressID.value = addressid;                        #一個表的IDRuby CommunityX+b(pO;HVZ J
  submitForm("/sk1405/linkto?method=showAddressInfo");              # 同上Ruby Community)v:sb7N'fc
}

controller中的寫法 更具不通人的需求就不用, 主要是貼 2個表成一個表的效果

关键点  <table  align ="left >  2個表格都是這樣寫 就OK 了
miG8Y"c9nI ^-c-PH4n0


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-11-22  
      1
2345678
9101112131415
16171819202122
23242526272829
30      

数据统计

  • 访问量: 42
  • 日志数: 8
  • 图片数: 1
  • 文件数: 1
  • 建立时间: 2008-05-09
  • 更新时间: 2008-11-11

RSS订阅

Open Toolbar