51Job自动收藏职位

<p>javascript代码如:(现在只限于两个条件java+上海,可自己更改内容.将代码放到html文件中,在IE中运行就可以)!!!切记先登录,在同一个浏览器里(用EditPlus),在<a href="http://www.51job.com">www.51job.com</a>上登录,一定要先登录,让内存中产生一个cookice,在服务器上产生相应的session才行。不然报错. 大家有什么问题请留言</p>
<p>&lt;html&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;title&gt; 51job &lt;/title&gt;</p>
<p>&lt;meta http-equiv="Content-Type" content="text/html; charset=gb2312"&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/Base.js?20101126"&gt;&lt;/script&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/Base.ZzLayer.js?20101126"&gt;&lt;/script&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/Base.ZzLayer.ExtZzLayer.js?20101126"&gt;&lt;/script&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/search/Base.Search.js?20100407"&gt;&lt;/script&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/payservice/GetCompetition.js?20100604"&gt;&lt;/script&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/my/My_SMS_Self.js?20100421"&gt;&lt;/script&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/fans.js?20101126"&gt;&lt;/script&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/cv/CV_QuickApply.js?20100726"&gt;&lt;/script&gt;</p>
<p></p>
<p></p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/jQuery.js"&gt;&lt;/script&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/JsBase.js"&gt;&lt;/script&gt;</p>
<p>&lt;script language="javascript" src="http://js.51jobcdn.com/in/js/2009/login.js"&gt;&lt;/script&gt;</p>
<p>&lt;script type="text/javascript"&gt;</p>
<p>  var xmlrequest=null;</p>
<p>  function createXMLHttpRequest()</p>
<p>  {if(window.XMLHttpRequest){xmlrequest=new XMLHttpRequest();}</p>
<p>else if(window.ActiveXObject){try{xmlrequest=new ActiveXObject("Msxml2.XMLHTTP");</p>
<p>  }catch(e){try{xmlrequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}} }</p>
<p></p>
<p></p>
<p>  function submit51()</p>
<p>  {</p>
<p>   createXMLHttpRequest();</p>
<p>var username=document.getElementById("username").value;</p>
<p>var userpwd=document.getElementById("userpwd").value;</p>
<p>   var url="http://my.51job.com/my/My_Pmc.php?username="+username+"&amp;userpwd="+userpwd;</p>
<p></p>
<p>   xmlrequest.open("get",url,true);</p>
<p>   xmlrequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");</p>
<p>   xmlrequest.onreadystatechange=search51;</p>
<p>   xmlrequest.send(null);</p>
<p>  }</p>
<p></p>
<p>function  search51()</p>
<p>  {</p>
<p>    if (xmlrequest.readyState==4)</p>
<p>    {</p>
<p>      if(xmlrequest.status==200)</p>
<p>      {</p>
<p>for(var i=1;i&lt;20;i++)</p>
<p>{</p>
<p>var url="http://search.51job.com/jobsearch/search_result.php?fromJs=1&amp;jobarea=0200&amp;district=0000&amp;funtype=0000&amp;industrytype=00&amp;issuedate=9&amp;providesalary=99&amp;keyword=java&amp;keywordtype=2&amp;curr_page="+i+"&amp;lang=c&amp;stype=2&amp;postchannel=0000&amp;workyear=99&amp;cotype=99&amp;degreefrom=99&amp;jobterm=01&amp;lonlat=0,0&amp;radius=-1&amp;ord_field=0&amp;list_type=0&amp;fromType=14";</p>
<p></p>
<p>search51pg(url);</p>
<p>}</p>
<p>      }</p>
<p>    }</p>
<p>  }</p>
<p></p>
<p>function search51pg(url)</p>
<p>{</p>
<p>createXMLHttpRequest();</p>
<p>xmlrequest.open("get",url,true);</p>
<p>xmlrequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");</p>
<p>xmlrequest.onreadystatechange=search51back;</p>
<p>xmlrequest.send(null);</p>
<p>}</p>
<p></p>
<p></p>
<p>function  search51back()</p>
<p>  {</p>
<p>    if (xmlrequest.readyState==4)</p>
<p>    {</p>
<p>      if(xmlrequest.status==200)</p>
<p>      {</p>
<p>str = xmlrequest.responseText;</p>
<p>var ary = str.split("http://search.51job.com/job/");</p>
<p>for(var i=1;i&lt;ary.length;i++)</p>
<p>{</p>
<p>//var url="http://search.51job.com/job/"+ary[i].split(",")[0]+",c.html";</p>
<p>//alert(url);</p>
<p></p>
<p>zzSearch.saveJobClk( ary[i].split(",")[0] , event );</p>
<p>}</p>
<p></p>
<p>      }</p>
<p>    }</p>
<p>  }</p>
<p></p>
<p>&lt;/script&gt;</p>
<p></p>
<p>&lt;/head&gt;</p>
<p></p>
<p>&lt;body&gt;</p>
<p></p>
<p>&lt;table&gt;</p>
<p>&lt;tr&gt;</p>
<p>&lt;td align="right"&gt;username:&lt;/td&gt;</p>
<p>&lt;td&gt;&lt;input name="username" type="text" id="username" value="" class="input140" style="color:#000;" /&gt;&lt;/td&gt;</p>
<p>&lt;/tr&gt;</p>
<p>&lt;tr&gt;</p>
<p>&lt;td align="right"&gt;userpwd:&lt;/td&gt;</p>
<p>&lt;td&gt;&lt;input name="userpwd" type="password" id="userpwd" value="" class="input140" style="color:#000;" /&gt;&lt;/td&gt;</p>
<p>&lt;/tr&gt;</p>
<p>&lt;tr&gt;</p>
<p>&lt;td align="right" colspan=1&gt;&lt;input type="button" onclick="submit51()" value="login" /&gt;&lt;/td&gt;</p>
<p>&lt;/tr&gt;</p>
<p>&lt;/table&gt;</p>
<p></p>
<p></p>
<p>&lt;script language="JavaScript" type="text/javascript"&gt;</p>
<p>var obj1;</p>
<p>var sUrl   = 'http://my.51job.com' + '/payservice/fans/fans_ajax.php?jsoncallback=?';</p>
<p>var coidArr = document.getElementsByName('coid');</p>
<p>var fansnum = document.getElementById('fansnum');</p>
<p>if(fansnum){</p>
<p>obj1 = $("#fansnum");</p>
<p>}else if(coidArr[0]){</p>
<p>obj1 = $("#" + coidArr[0].value);</p>
<p>}</p>
<p>var obj2  = $("#message");</p>
<p>if(obj1){</p>
<p>var offset = obj1.offset();</p>
<p>document.getElementById('message').style.top = offset.top - obj2.height() / 2 + obj1.height() / 5 + 'px';</p>
<p>document.getElementById('message').style.left = offset.left - obj2.width() + 'px';</p>
<p>}</p>
<p>for(var i = 0;i &lt; coidArr.length; i++){</p>
<p>if(coidArr[i].value){</p>
<p>var flg = 0;</p>
<p>for(var j = 0;j &lt; i; j++){</p>
<p>if(coidArr[j].value &amp;&amp; coidArr[i].value == coidArr[j].value){</p>
<p>flg = 1;</p>
<p>break;</p>
<p>}</p>
<p>}</p>
<p>if(flg == 0){</p>
<p>$.getJSON(sUrl, {type:'0',coid:coidArr[i].value,step:i}, function (data){</p>
<p>var fansnum1 = document.getElementById(coidArr[data.index].value);</p>
<p>if(fansnum){</p>
<p>fansnum.innerHTML = data.searchData;</p>
<p>}</p>
<p>if(fansnum1){</p>
<p>fansnum1.innerHTML = data.searchData;</p>
<p>}</p>
<p>if(data.compfans != "1" &amp;&amp; document.getElementById('message').style.display == 'none'){</p>
<p>document.getElementById('message').style.display = 'block';</p>
<p>}</p>
<p>});</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p>&lt;/script&gt;</p>
<p>&lt;script language="javascript"&gt;</p>
<p>&lt;!--</p>
<p>window.cfg = {</p>
<p>fileName: 'show_job_detail.php' ,</p>
<p>lang : 'c' ,</p>
<p>stype : '' ,</p>
<p>fullLang : 'Chinese' ,</p>
<p>langs : {</p>
<p>sqzwml : 'applyjob' ,</p>
<p>qzzwqdg : '请在要选择的职位前打勾!' ,</p>
<p>myml : 'my' ,</p>
<p>ts_qxjzw : '请选择职位' ,</p>
<p>queren : '确认' ,</p>
<p>guanbi : '关闭' ,</p>
<p>nzdnxj : '您最多能选择' ,</p>
<p>xiang : '项' ,</p>
<p>xzdq : '选择地区' ,</p>
<p>xj_xg : '选择/修改' ,</p>
<p>zycs : '主要城市' ,</p>
<p>sysf : '所有省份' ,</p>
<p>buxian : '不限' ,</p>
<p>qingxj : '请选择' ,</p>
<p>yixuan : '已选' ,</p>
<p>znlb : '职能类别' ,</p>
<p>hylb : '行业类别' ,</p>
<p>gzdd : '工作地点' ,</p>
<p>quanbu : '全部' ,</p>
<p>zhineng : '职能' ,</p>
<p>hangye : '行业' ,</p>
<p>didian : '地点' ,</p>
<p>qsrgjz : '请输入关键字' ,</p>
<p>srpcgjz : '输入排除关键字'</p>
<p>} ,</p>
<p>url : {</p>
<p>root : 'http://search.51job.com/jobsearch' ,</p>
<p>image : 'http://img01.51jobcdn.com/im/2009' ,</p>
<p>image_search : 'http://img01.51jobcdn.com/im/2009/search' ,</p>
<p>image_search_lang : 'http://img01.51jobcdn.com/im/2009/search/c' ,</p>
<p>image_search_c : 'http://img01.51jobcdn.com/im/2009/search/c' ,</p>
<p>image_search_e : 'http://img01.51jobcdn.com/im/2009/search/e'</p>
<p>} ,</p>
<p>domain : {</p>
<p>my : 'http://my.51job.com' ,</p>
<p>search : 'http://search.51job.com'</p>
<p>} ,</p>
<p>isJobview : '1' ,</p>
<p>isAcStatRecJob : '1' ,</p>
<p>acStatRecJobType : '0803111457'</p>
<p>};</p>
<p></p>
<p>function searchInit() {</p>
<p>if ( window.Search ) {</p>
<p>clearInterval( intVal );</p>
<p>window.zzSearch = new Search( {</p>
<p>searchForm : document.searchForm ,</p>
<p>pageForm : document.pageForm ,</p>
<p>excludeForm : document.excludeForm ,</p>
<p>pageJumpForm : document.pageJumpForm ,</p>
<p>selJobPageForm : document.selJobPageForm ,</p>
<p>cfg : cfg</p>
<p>} );</p>
<p>}</p>
<p>}</p>
<p>var intVal = window.setInterval( searchInit , 50 );</p>
<p>//--&gt;</p>
<p>&lt;/script&gt;</p>
<p>&lt;/body&gt;</p>
<p></p>
<p>&lt;/html&gt;</p>
<p></p>

你可能感兴趣的:(job)