|
<style>7 k+ k2 p/ A2 {: l
.subject{font-weight:bold;}% ] ?+ Q6 Y8 t
legend{font-weight:bold;color:red}
! L' q. e: c6 J& W7 n1 R M* Q0 ^* g</style>) c$ l; J$ D! m
<input type="hidden" name="insdevBId" id="insdevBId" value="28008">
4 ]/ k) a1 @9 x7 i0 C; n<input type="hidden" name="insdevSId" id="insdevSId" value="6217">
5 l/ n* h9 _" H<input type="hidden" name="userInfo" id="userInfo">
- l' A' j) ]! g2 x" ?4 T% h2 W3 h <fieldset>+ _- B4 {. n! ?1 ?5 J
<legend>社区调查问卷</legend>
8 {2 O% [( {5 ]2 F( s% J* } 本站的各位朋友,大家好:<br>
c, D; C6 X; @/ X+ k) F4 D6 @( l 请大家花2分钟的时间,填写一下下面的问卷调查,这有助于帮我们了解自己社区的情况,更好的建设我们自己的家园。谢谢大家的参与!:)
+ |% R, [6 a" X( y <br><p>/ K# D* q- _5 w- Z2 o5 K
<label class="subject">1.请问您的性别是?</label><br>
- W8 x/ [, J) y9 U1 I. R7 z: \ <input type="radio" id="sexMale" value="1" name="data[sex]"><label name="forSex"> 男</label>( N$ D' o; l v9 l& L4 C' X0 s* ~& N
<input type="radio" id="sexFemale" value="2" name="data[sex]"><label name="forSex"> 女</label>. v _( r( H9 N9 Y, F8 Z0 A
</p>6 u. z1 O* f! V& q
<p>
_* X/ E/ `/ _" k/ V$ c" J <label class="subject">2.请问您是否结婚?</label><br>8 S3 l! x4 W/ Z& k% \
<input type="radio" id="married" value="1" name="data[marry]"><label id="forMarry"> 未婚</label>
7 [3 T% p! Z& y' P8 T& N! l <input type="radio" id="unmarried" value="2" name="data[marry]"><label id="forMarry"> 已婚</label>
1 m5 i) U) f; l$ S) Z </p>5 i1 a. z" o9 P! k0 F* c
<p>
! k6 C q* y, x) t& c! X- p% a <label class="subject">3.请问您的年龄是?</label><br>" F; [% x+ F, B/ W. ~, b
<input type="radio" name="data[age]" value="1"> 18岁以下<br>
1 O" P4 u& S- g3 y$ T <input type="radio" name="data[age]" value="2"> 18-24岁<br>7 H9 m3 s% y9 X. @
<input type="radio" name="data[age]" value="3"> 25-30岁<br>
; R; \/ q' @" @8 }. V( I <input type="radio" name="data[age]" value="4"> 31-35岁<br>, G5 D* n+ c/ _7 F* H
<input type="radio" name="data[age]" value="5"> 36-40岁<br>
3 M: d9 [* K9 o$ F8 { <input type="radio" name="data[age]" value="6"> 41-50岁<br># w% H7 {6 p1 z) l
<input type="radio" name="data[age]" value="7"> 50岁以上<br>" D' B, i3 O7 X/ J
</p>
( R2 B( q$ q4 _- G& u9 K <p>, ]2 S# t% q2 o9 \, ^( W
<label class="subject">4.请问您现在的居住地(日常工作/生活的地方)?</label><br>
4 |! t- W2 H* b# P! {: y i. \ <select name="data[province]" id="province">
2 ~5 o7 w: ?- T# @ <option value="0">请选择居住地</option>$ U/ m2 R5 I( a9 k6 e, q
<option value="beijing">北京</option>7 S; ?7 e7 D7 C, l& N! j# {
<option value="tianjin">天津</option>+ N; X3 G7 b0 [( ^1 l
<option value="hebei">河北</option>
" O$ R2 b; ]& f4 V* r9 K <option value="shanxi">山西</option>
) i; h9 m& A/ ? X& M+ K0 ?3 B <option value="neimenggu">内蒙古</option>9 b+ e \% B% C
<option value="liaoning">辽宁</option>3 {+ v3 f1 c. k- c7 R" x: J8 V+ \9 l+ C
<option value="jilin">吉林</option>+ f- v" H+ A6 [9 h* f; T
<option value="heilongjiang">黑龙江</option>. @4 n( p; a$ T7 ]9 j5 Q4 W& m [
<option value="shanghai">上海</option>- D8 D) \/ Y `1 N
<option value="jiangsu">江苏</option>' K3 s% \1 u6 x; U' p* i
<option value="zhejiang">浙江</option>
0 N8 b4 p" V& q* j8 c <option value="anhui">安徽</option>) V" B- r$ [, C
<option value="fujian">福建</option> i) l& ^& V" O: r; \5 f
<option value="jiangxi">江西</option>
2 B; F, _6 y/ [ <option value="shandong">山东</option>
. Y k' _. u0 }# N9 u& v' P& a <option value="henan">河南</option>/ S5 j1 G1 A) A9 c" q. _* X
<option value="hubei">湖北</option>' e9 m9 g) q1 ] l
<option value="hunan">湖南</option>/ L+ ~3 v _& `$ t! j
<option value="guangdong">广东</option>
+ t( @% n: U: P, x) F) j& z0 ? <option value="guangxi">广西</option>
* ?' M6 G- _; a0 R2 k( k9 {* M <option value="hainan">海南</option>
2 h% e) A1 m. @% s- r9 M <option value="chongqing">重庆</option>
$ R9 {2 f+ G+ d8 T) @ <option value="sichuan">四川</option>; }3 G$ I: M1 [$ O( _! N
<option value="guizhou">贵州</option>0 E, r8 ~" o% E% c& b+ x
<option value="yunnan">云南</option>
5 O: l+ @3 \, f b9 r <option value="xizang">西藏</option># q) R" }2 w! Z. L9 F; B
<option value="shanxi3">陕西</option>
. b; n3 v6 h: |9 N6 K <option value="gansu">甘肃</option>
' ]0 [1 R3 g3 Z4 M G <option value="qinghai">青海</option>
* Q7 G, E: b- k( i0 X <option value="ningxia">宁夏</option>
) ?+ z2 g1 C3 O2 n <option value="xinjiang">新疆</option>
% v! C- `% v6 o <option value="hongkong">香港</option>8 q9 H% ~+ d) g4 P8 _" O% N
<option value="macao">澳门</option>
& q* E: k, W( y" M9 K8 u <option value="taiwan">台湾</option>8 ^* ?8 ]" p; N/ o1 ?4 A
</select>; i: Y n8 W4 s4 y, U" E
</p>
# i! g8 N8 b$ `7 y4 y <p>
. \- \+ I: v& k, @! n; X- l <label class="subject">5.请问您的最高学历是?</label><br>
# {3 @* t! |6 K/ M3 m" Y2 w <input type="radio" name="data[education]" value="1"> 初中以下<br>
) N6 k$ ^( T5 ~: V* R <input type="radio" name="data[education]" value="2"> 初中<br>
7 P' R T1 S3 P7 C( ?& { <input type="radio" name="data[education]" value="3"> 高中<br>' t7 l$ ?! A- E& _3 M' R# Q) F& o
<input type="radio" name="data[education]" value="4"> 大学专科/本科<br>
" F4 W& ?# O5 g8 I& }1 ]& G <input type="radio" name="data[education]" value="5"> 硕士及以上<br>) i2 }1 b# `. y
</p>) N% c+ b! a+ f/ l5 I
<p>& s/ x5 }( V+ R* E$ p @
<label class="subject">6.请问您目前的职业情况是?</label><br># [" B6 V8 [# N3 Q( Q& R! `
<input type="radio" name="data[career]" value="1"> 企业管理者<br>
, r3 A6 v! Y! z$ z9 g <input type="radio" name="data[career]" value="2"> 企业员工、白领<br>! E! }- B, S# c) w p
<input type="radio" name="data[career]" value="3"> 官员、政府公务员<br>
" a" Y/ o5 {5 Z$ { <input type="radio" name="data[career]" value="4"> 专业人士(如演员、律师、分析师、咨询师、教师、工程师、技术人员等)<br># L0 N7 x7 f! ?4 O8 {
<input type="radio" name="data[career]" value="5"> 在校学生<br>7 u( {9 I! m" L, ~3 Q1 f8 p
<input type="radio" name="data[career]" value="6"> 城市自由职业者<br>3 `3 W3 q y( n( E, |) X
<input type="radio" name="data[career]" value="7"> 农民或农村务工者<br>9 l5 Z+ o1 ~5 w; _" j$ ?' b
<input type="radio" name="data[career]" value="8"> 无业<br>
9 X* g; N% j' ~4 `. a </p>
3 m$ g; y x( f6 S& j" o7 @ <p>
. { S8 F% {" |6 | <label class="subject">7.请问您的个人月收入是?</label><br>
5 M+ C) ^2 J: ~- c <input type="radio" name="data[salary]" value="1"> 无收入<br> ~3 I! F z* Z
<input type="radio" name="data[salary]" value="2"> 1000元以下<br>
}( f8 g3 M& D. Y( ^* T9 X <input type="radio" name="data[salary]" value="3"> 1001-3000元<br>
& p1 l( @% @0 o. b0 d% C <input type="radio" name="data[salary]" value="4"> 3001-5000元<br># c1 d4 a" }1 k& s
<input type="radio" name="data[salary]" value="5"> 5001-8000元<br>2 Q5 }5 X- {" }; n5 J: R m
<input type="radio" name="data[salary]" value="6"> 8000-10000元<br>
* z$ f" R; g/ a5 G4 q: Y <input type="radio" name="data[salary]" value="7"> 10000-20000元<br>
- `- m. P8 Z: ?7 z0 r0 V" d$ P <input type="radio" name="data[salary]" value="8"> 20000元以上<br>4 y/ J6 y! S2 w8 J
</p>; a& U: l& I- ]. q. ~4 N
<p>! p7 a& W K5 [# H& n7 N' R
<label class="subject">8.请问您每月手机通话费约为?</label><br>9 u/ H& [3 |2 V9 r- w5 U$ l
<input type="radio" name="data[costMobile]" value="1"> 非手机用户<br>! ~9 o& [2 K% q' @% ^& G! c
<input type="radio" name="data[costMobile]" value="2"> 100元以下<br>
& \( _) g! k) I/ z3 g <input type="radio" name="data[costMobile]" value="3"> 101-200元<br>+ Z4 M& Z: @9 X, U2 c$ ?
<input type="radio" name="data[costMobile]" value="4"> 201-300元<br>8 l. Q& `2 t+ i v7 ]$ g7 Q
<input type="radio" name="data[costMobile]" value="5"> 301-400元<br>+ @+ w; Z# K6 K! Y
<input type="radio" name="data[costMobile]" value="6"> 401-500元<br>
& J v$ d: m6 l+ b <input type="radio" name="data[costMobile]" value="7"> 500元以上<br>
: Q! k9 E+ ~* F </p>
' ~- ^8 i/ t6 Z% f" M; d/ ^ <p>
) r! w# Y; t) Y: h7 G% U <label class="subject">9.请问您是否已经购房或拥有独立住房?</label><br>0 ^* }/ p5 L7 e: |& m) F
<input type="radio" id="noHouse" value="1" name="data[house]"><label name="forHouse"> 否</label>
; n2 q2 [/ D" u! | <input type="radio" id="haveHouse" value="2" name="data[house]"><label name="forHouse"> 是</label>% ^- e' A# l" u& z* e! e A0 L
</p>
5 U% S' g( |% i: }3 g+ Q/ l4 n <p>0 n; p: K0 B% @# {9 k. x0 E
<label class="subject">10.请问您是否已经购车或拥有私人汽车?</label><br>
8 m- f5 c% j! g8 t/ u% ~ <input type="radio" id="noCar" value="1" name="data[car]"><label name="forCar"> 否</label>) M k6 y+ x2 x/ `/ e
<input type="radio" id="haveCar" value="2" name="data[car]"><label name="forCar"> 是</label>3 D2 X# I- [+ F% L" k
</p>, {# `* e# k8 f" ^( n
<p>, m$ o, N. I; a7 N( i
<label class="subject">11.您一周浏览论坛的时间有多少?</label><br>
# W6 I4 T$ \: J0 K' r! U% k6 ` <input type="radio" name="data[bbsTime]" value="1"> 1小时以下<br>' E4 l+ O* a1 B; Y' [
<input type="radio" name="data[bbsTime]" value="2"> 1-3小时<br>
$ C/ `3 B) H% a0 f" r# x% r6 @ <input type="radio" name="data[bbsTime]" value="3"> 3-6小时<br>; F8 y% f. W! D% k
<input type="radio" name="data[bbsTime]" value="4"> 6-8小时<br>
$ [8 Q' H" C6 ] <input type="radio" name="data[bbsTime]" value="5"> 8小时以上<br>+ N: d% S# q' P' r$ M
</p>' q- x7 Q: X* Q7 o( v: n
<center><input type="button" value="投 票" onclick="pollValidate();"></center>7 }3 o4 m5 q- M, i4 N! q* U
</fieldset>0 X1 x% d6 y, f: j* x. H$ z* M' p
<script type="text/javascript">* s, }, @& a3 r7 w$ ]. T( f* E
function checkRadio(name){! \( M# N5 p' T3 S! @% }
var o = document.getElementsByName(name);* R8 A2 r# M! t; l) [4 Q9 h" v: }
var n = o.length;
- k3 P, w! V- |( w6 U var m = 0;
3 Y8 p {4 Z; H8 n for (var h=0;h<n;h++){
# P2 Z; ~. b1 `3 z/ f& h if (o[h].checked==true){
& p3 q' H" n9 a( ^ m += o[h].value;0 [- h U. l3 h
}
( v: `% n. {3 W7 S& [; s: J }+ S+ n4 J0 T4 \
return m;9 O! C9 C6 E" s) C& c& n
}
* J- o6 ~2 s9 J P' E9 ?8 a" }2 C. n( h
function pollValidate(){; S0 L# U9 z; F% p; J) O
var link = "http://api.insenz.com/poll_response.php?";# R( U0 r- o, l/ n5 ?) l* r0 G/ b4 }7 T
if (checkRadio("data[sex]")==0){% V Q' ~' X7 ?+ Q4 l
alert("请选择性别");
4 z) s( ^" E2 ] return false;. n5 r0 p6 h2 |3 x+ k
} else {
$ }: R0 y* M' z; _8 T1 d link += "sex="+checkRadio("data[sex]");9 W: P5 {3 A$ P" u4 Z1 i8 b6 `
}) v! E _- `2 u$ @' L, d
if (checkRadio("data[marry]")==0){" ^2 D6 E+ K2 |4 O! x$ [: X* K
alert("请选择婚姻状况");& S) ]! `4 z. Z$ @
return false;" v. H9 A( t* `' v" x
} else {
8 |0 }% U$ `: ] link += "&marry="+checkRadio("data[marry]");
! X+ a, O5 V& i7 }6 A" G$ D }- {( ?7 {$ z1 e
if (checkRadio("data[age]")==0){% N' l7 @3 W4 |, ^
alert("请选择年龄");" w9 a8 w% H- x+ Z4 @* H
return false;4 a1 `4 W Z7 y7 ?" d: ~5 U
} else {
" K4 z3 H. H" A& f0 S8 ~6 U link += "&age="+checkRadio("data[age]");: S2 T! l: G" Q6 u2 F# J/ F
}
: I+ K0 ~9 y& p( x if (document.getElementById("province").value=="0"){+ ^6 a( h0 F0 _" J/ e
alert("请选择居住地");
0 B H7 ?" m8 k% I+ q6 D return false;
8 P: i( P+ H' [" l } else {
6 w/ v- P2 B9 u# B1 {3 {* i; z link += "&province="+document.getElementById("province").value;6 @6 O, k3 \9 {/ H5 u: W
}( _3 d. Y2 R/ Q9 l9 s
if (checkRadio("data[education]")==0){
- A5 W/ L' C" R! c alert("请选择教育经历");
+ |+ R. f; `% H! y4 E2 c/ V* a return false;
* e, G, ]! w# B7 _, K } else {
' p# X8 i8 i7 j+ P7 Z, P" R link += "&education="+checkRadio("data[education]");
8 m) E: e2 G/ H6 B8 j: v5 h. H }& X, m# y8 T0 |! c
if (checkRadio("data[career]"==0)){: p$ v$ k2 {2 u) \% w& o
alert("请选择职业");
; z: ~9 w6 R% J0 z+ I return false;
& u2 c* A4 p7 C } else {% e7 M3 x. e3 }1 P! _; f l! s$ R; r
link += "&career="+checkRadio("data[career]");7 B; r5 A! D7 ^- [$ U; J
}: _9 l6 m Q3 \6 p
if (checkRadio("data[salary]")==0){
# y( I$ U* F* K alert("请选择工资状况"); V" b( X2 o" r. h& H- l4 t
return false;) z5 @+ X1 m; d/ X. I6 I
} else {# @9 G5 W3 m+ _: R4 ^
link += "&salary="+checkRadio("data[salary]");( m2 K1 Y# y) M+ T1 P% V0 G& b
}' S+ G, M/ q0 p/ d2 K
if (checkRadio("data[costMobile]")==0){
! R8 q) L/ K# A9 } alert("请选择每个月的手机话费");
" p6 b5 [2 S2 G return false;
* r5 B0 i9 @" l } else {1 U; ?) ^/ B0 F4 j) o
link += "&costMobile="+checkRadio("data[costMobile]");
+ Q- \( X1 |& e" H }
* ^ x# V, K( X l/ |3 f if (checkRadio("data[house]") == 0){
( l3 T$ }) ~' t1 J# [ alert("请选择您拥有住房情况");
# b3 x- S4 Z* _/ a1 G return false;3 J' \+ D& Q) j
} else {
9 k2 J: i! x/ M$ q" P, J9 w link += "&house="+checkRadio("data[house]");
1 U- X1 P0 J1 Q5 k }0 @$ N# G4 L: t( v
if (checkRadio("data[car]")==0){
! V! n# h6 ?) L1 ^. ~ alert("请选择拥有汽车情况");
' n! p# z4 d! {6 }1 C1 z7 c return false;
+ }4 ]5 s5 L: U0 V( T% \3 c; f7 |& l } else {
( M7 l6 a) B) c link += "&car="+checkRadio("data[car]");
) @- E6 w, W, h8 ?2 f }
5 w H& q6 g( A" ? if (checkRadio("data[bbsTime]")==0){, e: i6 T8 w$ Z0 Q- S( L
alert("请选择每周浏览论坛的时间长度");
; ?4 d1 p0 l7 b/ i return false;# z# p# m/ I+ Q8 b$ D( e
} else {% P5 E2 K$ W7 t% O1 A( b/ T
link += "&bbsTime="+checkRadio("data[bbsTime]");2 j6 q* P& u4 F8 |0 T( K
}
& k+ F) B1 Q3 @7 t3 @3 }+ E location.href= link + "&userInfo="+encodeURI(getUserInfo()) + "&bId="+document.getElementById("insdevBId").value+"&sId="+document.getElementById("insdevSId").value;
& W2 k, Y/ W. ]) Z1 W }% r( d+ H3 z8 Z# x% N7 v* t2 l" M
function getUserInfo(){7 B6 X# r2 r. S) ]$ o2 W' Z
var aObj = document.getElementsByTagName("a");
1 N& F' i; H7 `# K( @ var l = aObj.length;" M5 Z3 c7 c6 ~4 @0 w
for(var j=0;j<l;j++){6 n$ `( @. s. p3 l: B
var hrefPatrn = /^space.php\?uid=(.*)$/gi;
# z; @% s) q2 t$ b' q4 {, I# g var href = aObj[j].getAttribute("href");% l0 b% ]& d+ s: K+ R, f, \
if (hrefPatrn.test(href)){
+ e, c8 o; G& r8 [- h8 Z arr = href.split("=");3 y; V7 Q2 t( I- p4 y( d6 u
uId = arr[1];) G7 s7 N' c$ z) T i7 _
uName = document.getElementById(aObj[j].getAttribute("id")).innerHTML;( |( [6 H" I7 ~2 k" y4 @
return uId+":"+uName; f. q- b5 N4 H7 _0 b( ~6 j
break;' Q, v' R$ S) O
}6 o9 X: R9 s, j& j' n
}7 _9 O. ^2 H0 q+ x/ E
}
: e5 u+ q& l) D</script>
" J H. p/ U3 H/ Q |
|