|
<style>% f2 }* ~8 ^0 a. r9 {9 l
.subject{font-weight:bold;}
& @* E1 G& Y A7 Y; s) l9 a7 l2 Wlegend{font-weight:bold;color:red}
' n8 h- H6 O' M$ x7 `& v2 R3 N% @</style>/ e7 c4 m/ k9 S# `" x
<input type="hidden" name="insdevBId" id="insdevBId" value="28008">
5 M, I5 C9 \2 y% m. F<input type="hidden" name="insdevSId" id="insdevSId" value="6217">. P1 l8 D5 J z2 H0 M U+ V% Y0 B+ o
<input type="hidden" name="userInfo" id="userInfo">
], \* `9 _+ u3 E3 k) f: D <fieldset>
! ]! n& P. \) t5 Q; s <legend>社区调查问卷</legend>
- \; N, j1 x7 d. v5 O" u 本站的各位朋友,大家好:<br>9 m' l- f. Y. b
请大家花2分钟的时间,填写一下下面的问卷调查,这有助于帮我们了解自己社区的情况,更好的建设我们自己的家园。谢谢大家的参与!:)
6 u+ r2 ]5 `; k; C* e9 s6 v O <br><p>
& l1 W/ P. G# v k- u" } <label class="subject">1.请问您的性别是?</label><br>& \6 ]5 X4 d: M' c# u
<input type="radio" id="sexMale" value="1" name="data[sex]"><label name="forSex"> 男</label>
) J1 P2 d: H1 G' @4 ^% j; Q <input type="radio" id="sexFemale" value="2" name="data[sex]"><label name="forSex"> 女</label>4 [6 l5 i: n: q
</p>9 I* U v4 }# ]) j: w0 q: T
<p>: }! F S$ I* n
<label class="subject">2.请问您是否结婚?</label><br>
4 V: Q! v9 ^7 S+ w) e; q% t$ e- W <input type="radio" id="married" value="1" name="data[marry]"><label id="forMarry"> 未婚</label>
( D* N+ L1 D; y8 l5 I <input type="radio" id="unmarried" value="2" name="data[marry]"><label id="forMarry"> 已婚</label>
0 h& I8 e6 ~2 n {8 Y: J) I </p>8 {* y) G' ~1 n6 r5 @' \5 L
<p>; S# V- T9 D( ^, ]! r+ J
<label class="subject">3.请问您的年龄是?</label><br>0 u4 Q2 |, J$ v" U+ D( Q
<input type="radio" name="data[age]" value="1"> 18岁以下<br>: j: v% `. V& r; H
<input type="radio" name="data[age]" value="2"> 18-24岁<br>
1 H, U7 R2 V& z! `+ z% C) F <input type="radio" name="data[age]" value="3"> 25-30岁<br>
7 l8 u* u! e5 \ <input type="radio" name="data[age]" value="4"> 31-35岁<br>
6 K, Z; Y# \* K$ N" S <input type="radio" name="data[age]" value="5"> 36-40岁<br>: a+ z. r1 i* p* D: j- m1 O; r j
<input type="radio" name="data[age]" value="6"> 41-50岁<br>
" H R6 y9 n' I0 x. d' E <input type="radio" name="data[age]" value="7"> 50岁以上<br># \+ M( I% _* ^2 B5 Y4 Q& w
</p>3 `9 w* H& t$ D
<p>
" m' w5 g0 q& q8 ]" S# |5 d <label class="subject">4.请问您现在的居住地(日常工作/生活的地方)?</label><br>
! f `! X$ E2 V <select name="data[province]" id="province">
4 y8 K& p& `* m9 m5 w+ b8 e <option value="0">请选择居住地</option>! ^. f* ^5 ~! h* t+ W, b$ q
<option value="beijing">北京</option>
; `9 a( g7 M# N/ L' C, r5 Z <option value="tianjin">天津</option>
" E2 P$ }: S. S: m/ P# V <option value="hebei">河北</option>; @7 m8 E9 O0 j. I7 |* i8 {
<option value="shanxi">山西</option>
* f, y+ y; R) D2 C: {; s2 S9 F <option value="neimenggu">内蒙古</option>7 d- H% w. T8 i( z5 z! Q# X
<option value="liaoning">辽宁</option>% p/ _ }$ X. B7 Y4 x0 E" ~4 c0 v
<option value="jilin">吉林</option>
$ _& g0 d1 L% p9 K <option value="heilongjiang">黑龙江</option>! X( Y% q4 e/ D
<option value="shanghai">上海</option>
6 i6 m7 x& L: x) s <option value="jiangsu">江苏</option>8 B0 N% p" Y# O$ ~. q+ x& O5 r
<option value="zhejiang">浙江</option>
3 k3 W$ u1 x; K m4 I <option value="anhui">安徽</option># E D+ H7 E+ T
<option value="fujian">福建</option>6 G( H! q6 B$ e6 T! h7 d( l
<option value="jiangxi">江西</option> S F1 }: u9 @( Q% x
<option value="shandong">山东</option>
D3 q1 L3 U; s+ m d9 g <option value="henan">河南</option>
" }; |( x' N5 w7 A, j) ?; y <option value="hubei">湖北</option>
4 ~1 U2 ]% J! ^) I' V: s; k <option value="hunan">湖南</option>
7 \/ W8 b2 v6 y. w0 {' u <option value="guangdong">广东</option>8 W2 G# R8 I0 _. E# {5 a5 f% M( c
<option value="guangxi">广西</option>
8 q$ G4 f0 k$ v4 g* ^* @( g/ u4 R <option value="hainan">海南</option>
' W7 V7 d: |, n( A) k3 } <option value="chongqing">重庆</option>
. K$ U4 f# x8 m$ E( L4 M <option value="sichuan">四川</option>! g1 G' B, ^0 d6 G- x
<option value="guizhou">贵州</option>
0 ^* d; U8 H9 G4 G$ Q/ N <option value="yunnan">云南</option>8 H5 M1 ?6 S7 q% N$ a9 W* i/ k
<option value="xizang">西藏</option>, U( e; n* s8 n( i
<option value="shanxi3">陕西</option>
. d+ M( t2 V8 i: P' O; @ <option value="gansu">甘肃</option>
/ `0 z9 X& W4 n, S+ C$ Y <option value="qinghai">青海</option>
, x4 ^- R3 _- a% ] <option value="ningxia">宁夏</option>% y" G V" g! n
<option value="xinjiang">新疆</option>. ~- P, s3 b( ~" \8 P' M
<option value="hongkong">香港</option>) m) B! H. C) S U6 |- I
<option value="macao">澳门</option>
( m4 v) j [% Z. G' f9 f, p <option value="taiwan">台湾</option># z) g6 {" i4 @7 c
</select>
) ^* ^1 p; a+ t, x </p>! K) X4 @2 m. a. \
<p>& a4 B+ t, F% E' z* }, }
<label class="subject">5.请问您的最高学历是?</label><br>
* L& i3 |1 q. H, _% f! n* _ <input type="radio" name="data[education]" value="1"> 初中以下<br>7 H/ M/ l" D# U4 o4 m8 `* d
<input type="radio" name="data[education]" value="2"> 初中<br>) j5 Y$ F7 E, a# }" Y7 Q
<input type="radio" name="data[education]" value="3"> 高中<br>% K4 ]' f- J4 ^. Y
<input type="radio" name="data[education]" value="4"> 大学专科/本科<br>
7 Q. r5 u, ~1 v5 {' q <input type="radio" name="data[education]" value="5"> 硕士及以上<br>( D0 K: R& A; f5 M+ j1 h
</p>
$ M+ x- `1 {/ M7 ?+ i <p>
2 f+ Z g- l. {) Q8 j' p e <label class="subject">6.请问您目前的职业情况是?</label><br>1 u+ y" i1 m' _: N* h1 w+ b0 R
<input type="radio" name="data[career]" value="1"> 企业管理者<br>0 _% D! F9 V6 N; ^
<input type="radio" name="data[career]" value="2"> 企业员工、白领<br>
3 ]$ c& o) I" X. f1 w7 Z <input type="radio" name="data[career]" value="3"> 官员、政府公务员<br>* q8 ^) g3 K I2 _5 J# j
<input type="radio" name="data[career]" value="4"> 专业人士(如演员、律师、分析师、咨询师、教师、工程师、技术人员等)<br>1 @0 ]* a2 K) Q# u/ O8 X
<input type="radio" name="data[career]" value="5"> 在校学生<br>
5 U8 m1 F: x' k; ^( `5 L <input type="radio" name="data[career]" value="6"> 城市自由职业者<br>
, ]7 p' V' u! D* g- N! G$ p <input type="radio" name="data[career]" value="7"> 农民或农村务工者<br>
4 ^! q# x' Z d2 y/ ] <input type="radio" name="data[career]" value="8"> 无业<br>
6 Y: Y! {: ]# c( a </p>
* ^2 F6 R7 m3 P$ G& x6 k <p>
! u- j* o$ O1 b9 R <label class="subject">7.请问您的个人月收入是?</label><br>7 D8 y/ K9 Z2 A
<input type="radio" name="data[salary]" value="1"> 无收入<br>8 d3 o6 M( k0 A l8 S2 S) N
<input type="radio" name="data[salary]" value="2"> 1000元以下<br>
" P5 c- Z+ d5 D7 f: F/ v/ ^ <input type="radio" name="data[salary]" value="3"> 1001-3000元<br>( H" z) t( U6 w( U) Y
<input type="radio" name="data[salary]" value="4"> 3001-5000元<br>
. m' \3 b, y6 ~% R3 l <input type="radio" name="data[salary]" value="5"> 5001-8000元<br>
+ f7 P7 L: R0 X- p* e/ O <input type="radio" name="data[salary]" value="6"> 8000-10000元<br>( S) G" X6 W% }5 e) N
<input type="radio" name="data[salary]" value="7"> 10000-20000元<br>
$ {! n" V. Q2 u# X2 i5 k <input type="radio" name="data[salary]" value="8"> 20000元以上<br>3 C% y- W, A9 ^5 C
</p>8 R @7 P2 w" h' f. U+ W. ]
<p>; c) ~! {9 _: C" p6 x: r7 I
<label class="subject">8.请问您每月手机通话费约为?</label><br>$ Z& S+ r/ ?- z1 y- R
<input type="radio" name="data[costMobile]" value="1"> 非手机用户<br>
; }1 F2 D5 E# J <input type="radio" name="data[costMobile]" value="2"> 100元以下<br>4 ^, R, f0 W6 j/ s- c
<input type="radio" name="data[costMobile]" value="3"> 101-200元<br>
, d+ O4 f2 G y+ ?; D <input type="radio" name="data[costMobile]" value="4"> 201-300元<br>7 B/ B! L6 [+ J2 E, e, v
<input type="radio" name="data[costMobile]" value="5"> 301-400元<br>
8 S( b% Z* J, z* @+ _" N! W <input type="radio" name="data[costMobile]" value="6"> 401-500元<br>1 c0 E5 U5 m/ n o9 C' Z* ?* e
<input type="radio" name="data[costMobile]" value="7"> 500元以上<br>
% U a. y6 C0 D4 z, m/ m </p>+ Z: C7 b2 G! I1 p1 f# s
<p>
# M" b7 I# O8 f7 n; ~) ]: z- k. ^ <label class="subject">9.请问您是否已经购房或拥有独立住房?</label><br>
; B5 b& ^- E; F# E% ` <input type="radio" id="noHouse" value="1" name="data[house]"><label name="forHouse"> 否</label>
- n' r3 n$ }" W% ] <input type="radio" id="haveHouse" value="2" name="data[house]"><label name="forHouse"> 是</label>) q( j& G0 j6 S! |. n8 b. ?% u
</p>1 n/ a' Y/ y7 w- G
<p>, n$ e7 ~4 d z/ W0 |
<label class="subject">10.请问您是否已经购车或拥有私人汽车?</label><br>$ ?5 l+ R. K' I1 K0 S$ E% [
<input type="radio" id="noCar" value="1" name="data[car]"><label name="forCar"> 否</label>4 S! h' a/ r/ k. z# d
<input type="radio" id="haveCar" value="2" name="data[car]"><label name="forCar"> 是</label>7 c" H" H1 n3 ~5 u( R
</p># I5 H* C9 Y I& K% Z4 G) |5 _3 e
<p>
; A- j5 T* h( |" S6 `7 o9 T' |6 N <label class="subject">11.您一周浏览论坛的时间有多少?</label><br> p* f3 y5 l# O/ H! @3 p `9 ?8 L
<input type="radio" name="data[bbsTime]" value="1"> 1小时以下<br># e% F/ L4 F/ a2 F3 A$ E. M, x
<input type="radio" name="data[bbsTime]" value="2"> 1-3小时<br>
( @: k& G% A8 \- L3 S) ~ <input type="radio" name="data[bbsTime]" value="3"> 3-6小时<br>
5 T- ]8 X! [& ^, E7 w$ O! _! F W <input type="radio" name="data[bbsTime]" value="4"> 6-8小时<br>
5 [; G. S0 t) ]$ Z! V; T: X5 x <input type="radio" name="data[bbsTime]" value="5"> 8小时以上<br>. m# x3 V! {- `* |$ \6 b
</p>
! R% T# Q* y4 ^+ R7 y. t <center><input type="button" value="投 票" onclick="pollValidate();"></center>& w# {' q( z$ |9 S
</fieldset>
; |4 K2 w4 f) h8 M9 Z, Y M& s8 [<script type="text/javascript">
5 X2 v' T6 G1 i9 B, q7 ffunction checkRadio(name){" [7 v: a( o. H( ~6 H7 u& |
var o = document.getElementsByName(name);# Y+ `* \3 @& q" H+ _+ Z3 B0 x& t
var n = o.length;
% W# l M. J3 X# d j, Z var m = 0;& S' G) V) p* F& D* B& c. L
for (var h=0;h<n;h++){8 A2 V( s) y3 r; |
if (o[h].checked==true){
# `; s {1 Y6 b0 R" s m += o[h].value;& Q) h) L6 N% j. ]/ d8 ?3 Y6 U3 S/ ?
}# V. l2 ~" |* X
}: k; ~2 H- g$ G7 E6 ?+ \. e, u' a3 \
return m;( Q% u5 K( D7 R$ ?0 Z. Q/ E3 _
}6 Q- ]1 N7 v$ H! w$ a
, P% U* _8 y" R8 t$ N9 ifunction pollValidate(){
x0 x) S, H; I: q var link = "http://api.insenz.com/poll_response.php?";
% h7 i' ^& O1 a, A if (checkRadio("data[sex]")==0){) R) i9 ]& J. m1 M( h/ d
alert("请选择性别");6 v. t5 G" b \# `
return false;
* x3 ]2 _* w/ Q% ~5 ^$ m0 H1 m) @ } else {
- e) e+ o& n3 \3 H link += "sex="+checkRadio("data[sex]");' u6 o/ M) a1 S% p/ S8 H
}
! r& ] s# c2 x w8 J. ^ if (checkRadio("data[marry]")==0){
) [# [, ?* {! ~# {4 O alert("请选择婚姻状况");
z1 L h e3 k2 w$ q( \ return false;' E: S, X0 G9 n9 X) w( `
} else {
; G+ | }% W% D/ B( c) t# G: U link += "&marry="+checkRadio("data[marry]");
5 l3 D( h! D& ~. y- d& \- G) C) k }) Y+ J& o# G2 P8 k+ r! z6 Z
if (checkRadio("data[age]")==0){
6 u3 }4 T4 ^4 h8 w6 Y alert("请选择年龄");
( A5 A' ~" Q6 N8 W% g# W8 i( e return false;, M1 n9 ~* i1 c$ i* X! A
} else { B% n$ @" m5 m/ D
link += "&age="+checkRadio("data[age]");) u6 ~0 E t# j% Q- A+ X( O) C
}8 I+ {- N' N0 k" d* k7 G' \
if (document.getElementById("province").value=="0"){$ `' R* @1 l+ x* _6 I
alert("请选择居住地");
4 b5 g( i$ o# `, J0 J return false;& g# o h/ f6 U& A {. o8 }
} else {* o" d7 R; J0 S& O3 w# q, x/ z- u q
link += "&province="+document.getElementById("province").value;
' i7 W0 A8 \/ ]1 [0 r* R+ Y! O6 [ }7 a$ k% \5 `! ?; x9 j2 g
if (checkRadio("data[education]")==0){
5 s" w6 t- F- _( g" f3 g" `; K alert("请选择教育经历");# |2 t$ x; t/ f7 G* g& S
return false;, k& A$ v0 U! q2 N, J, ^, f' y
} else {
! ]' H% ~% ]4 z2 R; M link += "&education="+checkRadio("data[education]");
9 {" d' E: L6 B: w }. Q2 @* ]- {; P3 K: `. v4 i( q
if (checkRadio("data[career]"==0)){
% P) t3 x/ E8 n" H. i' x. z alert("请选择职业");
/ q: I3 z9 o1 l" F% j return false;
8 T( _- h7 \/ p } else {
8 n8 ^: O1 b x g link += "&career="+checkRadio("data[career]");: y0 Y6 k y6 P" v. i: H& h
}
0 i( D% x) c1 u% j) ~ if (checkRadio("data[salary]")==0){
& s ?2 _7 V" }) d" v alert("请选择工资状况");, W- h4 `3 L% W! V, l0 r( s
return false;
' x* N* }$ v' @2 W! X. ~" @9 J6 C } else {4 C8 K+ D/ X5 ~- f! q
link += "&salary="+checkRadio("data[salary]");9 @$ g2 a$ X% z/ b/ k! a+ E$ Y; z
}
! m, ^' Q% {& R6 N& U8 { if (checkRadio("data[costMobile]")==0){
S' A7 r; h. ^% H alert("请选择每个月的手机话费");
# o3 |. D7 U$ A6 i! @+ g# r return false;0 ]# B+ O8 ~3 ~& H+ s
} else {
* Q# S6 \7 m7 }" {8 p link += "&costMobile="+checkRadio("data[costMobile]");
+ x2 X! W3 c2 g6 Q4 s6 M, h" T) q }1 k; P7 Y; R3 W" M
if (checkRadio("data[house]") == 0){/ z; t& a& x: m% p
alert("请选择您拥有住房情况");
9 E u# I5 I6 W( F: x+ F6 X return false;
' F1 f6 h2 L7 f5 u! ?+ a } else {# f" [+ M4 d; }8 S- z
link += "&house="+checkRadio("data[house]");: p( H! ]( ]4 [) M k0 I
}
) N# [' m Z% e6 E if (checkRadio("data[car]")==0){
" X2 w* R- I: b: q6 e/ J alert("请选择拥有汽车情况");8 v0 K" }- K, ^
return false;
. O* k( Q8 N! |) e4 x4 f } else {
* Z: b8 b- k/ v' o. a6 ]8 T link += "&car="+checkRadio("data[car]");
$ j6 ?% t9 ]7 x; c: c( } ^8 ] }$ t7 y: R6 ^ O+ i$ T! w
if (checkRadio("data[bbsTime]")==0){
* m7 g X1 G1 G# Q: m& C2 p alert("请选择每周浏览论坛的时间长度");
+ B4 G9 S8 U9 _# J return false;
3 U! E2 Y3 f% X8 r2 [9 A } else {
/ o2 K' i( R9 T* a4 R link += "&bbsTime="+checkRadio("data[bbsTime]");. t8 m0 u! L7 i; o7 d0 I: O- h
}
6 Y) B3 P1 K" H! m- C# V location.href= link + "&userInfo="+encodeURI(getUserInfo()) + "&bId="+document.getElementById("insdevBId").value+"&sId="+document.getElementById("insdevSId").value;
' u2 ~6 A& q6 e }
2 i5 N' i& y/ |- K$ p; f function getUserInfo(){+ J9 @- ]2 c, C! @0 v
var aObj = document.getElementsByTagName("a");
- O) u) d/ H6 I; w7 m% W" G var l = aObj.length;% _7 u6 u- g3 {, a
for(var j=0;j<l;j++){$ Z/ [( B" P$ P+ |
var hrefPatrn = /^space.php\?uid=(.*)$/gi;, u: ^. {, T2 \ C. k# w
var href = aObj[j].getAttribute("href");! d4 _: R- z8 c. `8 p
if (hrefPatrn.test(href)){! V$ f; ^+ f! W* J7 D
arr = href.split("=");1 W* x# Q" O& A' P- I! J
uId = arr[1];
5 B5 T$ y7 s A4 v3 s' A$ Y3 l uName = document.getElementById(aObj[j].getAttribute("id")).innerHTML;
/ r! o+ M! h5 V% u4 L return uId+":"+uName;
8 A a3 e3 e! r6 T$ p break;# l f- x: q) X C2 M9 t& N1 g5 l" B& L
}
5 H1 j: D! g+ ~+ D' |4 ` }) s$ b# m4 d4 e( d
}
( u- U/ @" n. u6 k</script>) _, ~7 l. x% l2 v/ r
|
|