2個表格拼成一個!

上一篇 / 下一篇  2008-08-08 15:53:58 / 个人分类:項目筆記

<table width="20%" cellspacing="0" cellpadding="0" border="0" align="left" rules="all" class="tbldata">
+Kz"da evI0                  <tr class="headtxtGroupOrg">
8A,g {pX!HM&]0                    <td width="20%" height="29" align="left">Ruby Community \N7J8Od.| r:_(UB R
                      <span class="font1">&nbsp;組名</span>
k'w9j|5gz*i3d6B7V0                    </td>Ruby Community8j*b6| _s!xF#h8~
                  </tr>
2bw:O%D3L[0y H8f0                <% for info in @mail_group %>
[(S]#o r7I({\0                  <tr>Ruby Community-_2ttu?4b
                    <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 %>">
a!u6` F A0                      &nbsp;<%=DSP.Label("gname","8",info.mail_group_name,"0") %>
'|e,qi$k?S[0                    </td>Ruby Community&V2RF9l;^0S'D~
                  </tr>
l:E+QH U'?\i0                <% end %>
s3[T4z-F+s2Nh+Js0                <% if @mgpLen < @madsslen %>Ruby Community2Dq0V&SA"XZ
                   <% for i in1..@madsslen- @mgpLen %>Ruby CommunityJN leZ/f
                   <tr>Ruby Community:}.ng^,YrKx1~t
                     <td width="20%" height="25px"></td>Ruby Community'R2B|:O [
                   </tr>
8Sg gA&b0                   <% end %>Ruby Community1V*T^!o/x%YG I$O3pDC
                <% end %>
8Z\)H*l$b)m.O0                </table>Ruby Community]Q` tndr v
                <table id="t1" width="80%" border="0" cellspacing="0" cellpadding="0" align="left" class="tbldata">Ruby Community}.G p$g@
                  <tr class="headtxtGroupOrg">
3b6R'xq ]:|7z0                    <td width="38%" height="29" align="left">Ruby CommunityC"PT4J/G]T
                      <span class="font1">姓名</span>Ruby Community2V-cc1{,u'} G1~2O SS
                    </td>Ruby CommunityT-OBmK+\
                    <td width="20%" align="left" class="font1">
7P,d6O_-NoO/v0                      &nbsp;敬称Ruby Communityg`:Z6e7|.f2I7~
                    </td>
YJG6}B)TO'~0                    <td width="25%" align="left" class="font1">
.f,{UZM0                      名字讀音Ruby Community%d^vY1P c n
                    </td>
{Cr2j1]'XS0                    <td align="left" class="font1">
)W\c.]4HK9JKF0                      &nbsp;内外Ruby Community7Xa0Wu?"{\YA
                    </td>
!@1p'us+P `:l{*J#y0                  </tr>Ruby Community+Af/mQX.p6X
                <% if @mail_addresses != nil and @mail_addresses.length > 0  then %>Ruby Communityk:L1kP~"{c \
                  <% for info in @mail_addresses %>Ruby Community J?m!G|[,|
                    <% info.kana_name = "" if info.kana_name == nil %>Ruby CommunityB7q~g9Q*B.O
                    <% info.keyi_name = "0" if info.keyi_name == nil %>
l2} RuW^|0                    <% info.office_mail_address = "" if info.office_mail_address == nil %>
1r,\(e v#m3y'n%`0                    <% info.mail_address = "" if info.mail_address == nil %>
x3m%j4H9K6P+B8b0                    <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%>">
ptL(n"W2` |*x `0                  <tr class="trBgcolor">
:@n3{.ln{Kt'T0                    <td height="25px" class="td" id=link2>Ruby Community.[']0Gc}+C5P&A
                      &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>Ruby Communitygh.E(mD#@7hpP
                    </td>
9` l~k+KfF0                    <td height="25px" class="td">Ruby Community5`0Xv2SgP;?x
                      &nbsp;<%= '閣下' if info.keyi_name == '1' %><%= '閣下' if info.keyi_name == '2' %>
*R w1{Ek@0                    </td>
0C!N^PQ5j0                    <td height="25px" class="td">Ruby CommunityR$q`^WU
                      <%=DSP.Label("kananame","8",info.kana_name,"0") %>&nbsp;
HS$Vgr/AE} e0                    </td>
3x*vl+X T.\y0                    <td class="td" height="25px">
P!? h iMxh0                      <% if info.office_mail_address.length > 0 and info.mail_address.length > 0 %>Ruby Community&f:l7QuQ&Z
                        <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 %>
h fpE}^7S0                        <img src="/images/lab_inside.gif" width="18" height="15"><% elsif info.mail_address.length > 0 %>Ruby Community)v;xS s-d
                           <img src="/images/lab_outside.gif" width="17" height="15">Ruby Communityor.H:C@0D{
                      <% else %>
9Y8Kq2@4JD5A0                         &nbsp;Ruby Community4O7ur9YU+bX}%P
                      <% end %>Ruby Communitye y4PX7X0X(Tp
                    </td>
S)~?K:JZ:_ds0                  </tr><% end %>Ruby Community,yg,O"j&q'P(^;Tt
                  <% end %>Ruby Communityo]H!Hs~V
                  <% if @mgpLen > @madsslen %>Ruby CommunityWa^/ay T"a2w1M|J
                     <% for i in1..@mgpLen- @madsslen %>Ruby Community)Eg(n N H \0Z5H
                  <tr class="trBgcolor">
N2Z!X g^A srA0                    <td width="20%" height="25px" class="td" id=link2></br></td>
#Ho RD.L2{0                    <td width="20%" height="25px" class="td"></br></td>
#Fp"U!t-pE` L.u0                    <td class="td" height="25px" class="td"></br></td>
8F@C0{i@/G0b7W0                    <td class="td" height="25px" class="td"></br></td>Ruby Community8|S9zo ~
                  </tr>Ruby Community8P$]%k5e?9f
                     <% end %>
+e9p2S*NI+DL:b0                  <% end %>Ruby Communitywf6^4TD[
                </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){
4ob6Zgnl+s u0  document.myform.hidGroupID.value = clickid;
;iB%~4wMm[F0K0  document.myform.updated.value = udpno;Ruby Communityn r@ O E8c;p
  for (var i = 1; i <= len; i++) {Ruby Community$@wHQ7C(\
    document.getElementById(i).bgColor = '#FFFFFF';                            #白色Ruby Community(\z^'z6x/NhT
  }Ruby Communityt_1^/rB^!@
  document.getElementById(tdid).bgColor = bgcolor;                             #bgcolor:一種顏色
:L Z3^1xl%LgB0  submitForm("/sk1405/linkto?method=groupclick");                             # submitForm   form.action=“"  ;form.submit()Ruby Community.`V;Td,A7Bc
}

function funcLink(addressid){
%N&|&[.u {3B#V?G2q0  document.myform.hidAddressID.value = addressid;                        #一個表的ID
4^W(`D1?nd'rtQ;lf0  submitForm("/sk1405/linkto?method=showAddressInfo");              # 同上
/]i1gYK$eZ0}

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

关键点  <table  align ="left >  2個表格都是這樣寫 就OK 了Ruby Community}f2u~9RO G


TAG:

 

评分:0

我来说两句

显示全部

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

日历

« 2009-07-05  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

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

RSS订阅

Open Toolbar