48 lines
1.0 KiB
JavaScript
48 lines
1.0 KiB
JavaScript
![]() |
$(document).ready(function(){
|
||
|
|
||
|
var msg={"adid":adid};
|
||
|
sendClientMsg(root+"Ad/adInfor",msg,"");
|
||
|
|
||
|
$("body").unbind('click');
|
||
|
$("body").click(function(event){
|
||
|
var _id=$(event.target).attr("id");
|
||
|
var arr=String(_id).split("_");
|
||
|
|
||
|
if (arr[0]=="addVacancy")
|
||
|
{
|
||
|
clearErrorTips("tip","errorTips");
|
||
|
var number=trimAll($("[name=number]").val(),"g");
|
||
|
var cost=trimAll($("[name=cost]").val(),"g");
|
||
|
var design=trimAll($("[name=design]").val(),"g");
|
||
|
|
||
|
|
||
|
if (number=="")
|
||
|
{
|
||
|
setErrorTips("number_tip","errorTips",message[6]);
|
||
|
return false;
|
||
|
}
|
||
|
if (cost=="")
|
||
|
{
|
||
|
setErrorTips("cost_tip","errorTips",message[6]);
|
||
|
return false;
|
||
|
}
|
||
|
if (design=="")
|
||
|
{
|
||
|
setErrorTips("design_tip","errorTips",message[6]);
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
var msg={"vnumber":number,"vcost":cost,"vdesign":design,"adid":adid};
|
||
|
sendClientMsg(root+"Vacancy/addVacancy",msg,"");
|
||
|
}
|
||
|
})
|
||
|
|
||
|
});
|
||
|
|
||
|
function adInfor(msg)
|
||
|
{
|
||
|
$("#ad_number").html(msg.number);
|
||
|
$("#ad_icity").html(msg.city);
|
||
|
$("#ad_area").html(msg.area);
|
||
|
$("#ad_community").html(msg.community);
|
||
|
}
|