2個表格拼成一個!

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

<table width="20%" cellspacing="0" cellpadding="0" border="0" align="left" rules="all" class="tbldata">Ruby Community g}}B:fZmUC
                  <tr class="headtxtGroupOrg">Ruby Community] O3b_$eU!l n
                    <td width="20%" height="29" align="left">
}(R7v7P7[2A0                      <span class="font1">&nbsp;組名</span>Ruby CommunityE3_LR!N:syJ+\
                    </td>
.t+E\^I{&v q.k f0                  </tr>Ruby CommunityH,X#IZ7m L't8?c i
                <% for info in @mail_group %>
X3MW-F'\8~Y,D)IL0                  <tr>
U HP6PHK/N0                    <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 %>">
J/n |-g6fk4I%? u0                      &nbsp;<%=DSP.Label("gname","8",info.mail_group_name,"0") %>Ruby CommunitytpOKVhHE
                    </td>Ruby CommunityV Ss7Y1u5K!Dokc)p
                  </tr>Ruby Community#^f/v {%r
                <% end %>Ruby Community3O2NrcqL?f$\uG
                <% if @mgpLen < @madsslen %>
7Zu]"@+gHo;b;UD0                   <% for i in1..@madsslen- @mgpLen %>
OI DW,iC0                   <tr>Ruby Community2k%R6US oY K5CP
                     <td width="20%" height="25px"></td>Ruby Community@f%v.dLb
                   </tr>Ruby Communityi"lI b JWlki
                   <% end %>
@9{:qf}0                <% end %>
s)xm!x4nNs0                </table>
cI*o`#?0B-t0                <table id="t1" width="80%" border="0" cellspacing="0" cellpadding="0" align="left" class="tbldata">Ruby Communityk'|.KV zx
                  <tr class="headtxtGroupOrg">Ruby Community$S5GyeGw
                    <td width="38%" height="29" align="left">Ruby Community1~"`bD r(|BOX$d
                      <span class="font1">姓名</span>
i,COyU5_0                    </td>Ruby Community:XI ~;Oh#y`2X]r
                    <td width="20%" align="left" class="font1">Ruby Community m H-?(N4D)B
                      &nbsp;敬称
}l%pT$E G2u+D0                    </td>
v?8\8r&~/a!Q S0                    <td width="25%" align="left" class="font1">Ruby Community.PAFQo;`[
                      名字讀音
)M$r4j+oQQ;w0                    </td>Ruby CommunityE6Z-Hj&d(S9x.e1H%kz'v$A
                    <td align="left" class="font1">
6t wx'DjBQ{&[0                      &nbsp;内外Ruby Community QJA([.OG9U;E Z'r
                    </td>Ruby Communityk+_,B Tn2C Q4K
                  </tr>
StH7_$k~X0                <% if @mail_addresses != nil and @mail_addresses.length > 0  then %>
1jf` F],@5H0                  <% for info in @mail_addresses %>Ruby Community+L!RU-s&KwI
                    <% info.kana_name = "" if info.kana_name == nil %>Ruby Community:{ P fMB!Ti*X
                    <% info.keyi_name = "0" if info.keyi_name == nil %>
[9jg}"aD0                    <% info.office_mail_address = "" if info.office_mail_address == nil %>Ruby CommunitySraRw'ym2y'~
                    <% info.mail_address = "" if info.mail_address == nil %>
8h$Z\$w2ViWt@0                    <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%>">Ruby Communityy$tw6S,l%Gz
                  <tr class="trBgcolor">
v6b-Q,q/B&f$w0                    <td height="25px" class="td" id=link2>
~EI&J h0Y0                      &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 CommunityHM+X'F9l.z"X Z
                    </td>Ruby CommunityY'WrP*ehc UXs
                    <td height="25px" class="td">
\1[:geVjD0                      &nbsp;<%= '閣下' if info.keyi_name == '1' %><%= '閣下' if info.keyi_name == '2' %>Ruby Community6l"[{U5h,\
                    </td>Ruby Community|6s{)rZ'y9x
                    <td height="25px" class="td">
/]K&fE3Ow(ik#gOz4r0                      <%=DSP.Label("kananame","8",info.kana_name,"0") %>&nbsp;Ruby CommunityAeJ.gcW7^
                    </td>
N3u Nhl0D!z-zh0                    <td class="td" height="25px">
?Hzc T0                      <% if info.office_mail_address.length > 0 and info.mail_address.length > 0 %>
~1V1bTY0                        <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 Community1}5IxlqU$R@!^
                        <img src="/images/lab_inside.gif" width="18" height="15"><% elsif info.mail_address.length > 0 %>Ruby Community{*M"u[L@)q
                           <img src="/images/lab_outside.gif" width="17" height="15">
(QlK5Gf d:k@/yQ?~V0                      <% else %>
'G+t/E$G6N k)a8xb0                         &nbsp;
^5`A4g GQV0                      <% end %>Ruby Community ~-RUki6z$q
                    </td>
6vc3gD7C+[0                  </tr><% end %>Ruby Community,{+~Y"AV1m K
                  <% end %>
Cfo)Ip%P^&bK0                  <% if @mgpLen > @madsslen %>Ruby Community)U+E:r6Jc_X}
                     <% for i in1..@mgpLen- @madsslen %>Ruby Community{1{@ ?p
                  <tr class="trBgcolor">
%YX#inG ?0                    <td width="20%" height="25px" class="td" id=link2></br></td>
N T[N#{9B.Y0                    <td width="20%" height="25px" class="td"></br></td>
"HZ#P*A9If}8R+~&p+o0                    <td class="td" height="25px" class="td"></br></td>Ruby Community]d+Fb r6s-[8~2@`
                    <td class="td" height="25px" class="td"></br></td>Ruby Community:lv~u`7_r j
                  </tr>
)c7s!av(x,Cx0                     <% end %>Ruby Community6s:w}N9h IE
                  <% end %>
&QorNwI3g1G.I }0                </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 Community8C4CH-\[
  document.myform.hidGroupID.value = clickid;Ruby Community4@Q Y\%vnH
  document.myform.updated.value = udpno;
"\ Ou cPYR-^$X0  for (var i = 1; i <= len; i++) {
#Q'r5{j)JH X*g5wG(AJ0    document.getElementById(i).bgColor = '#FFFFFF';                            #白色Ruby CommunityZ h6eSd'd4DIl7D
  }
f M |%?t4RM)P]0  document.getElementById(tdid).bgColor = bgcolor;                             #bgcolor:一種顏色Ruby Community?2]Z4[w { w4db
  submitForm("/sk1405/linkto?method=groupclick");                             # submitForm   form.action=“"  ;form.submit()Ruby Community"A%Q%H'V3t0n
}

function funcLink(addressid){Ruby CommunityR*MrpDyT
  document.myform.hidAddressID.value = addressid;                        #一個表的ID
4}1who/m"UY0  submitForm("/sk1405/linkto?method=showAddressInfo");              # 同上
7`y2}z @%oH1t1y0}

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

关键点  <table  align ="left >  2個表格都是這樣寫 就OK 了
FV.J1i+s[:U0


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