function logout(){ var oIframe = document.getElementById("_postproxy"); var oDoc = oIframe.contentWindow || oIframe.contentDocument; if (oDoc.document) { oDoc = oDoc.document; } oDoc.location.href="http://www.bdall.com/bdall.passport.php?ac=logout"; } function ifloaded(type){ var oIframe = document.getElementById("_postproxy"); var oDoc = oIframe.contentWindow || oIframe.contentDocument; if (oDoc.document) { oDoc = oDoc.document; } switch(type){ case 'loginform': jQuery('#user_area').html(oDoc.getElementById('user_login').innerHTML); var oForm=document.getElementById('loginform'); oForm.onsubmit=checkLogin; oForm.action='javascript:void(0);'; break; case 'logined': jQuery('#user_area').html(oDoc.getElementById('user_logined').innerHTML); break; case 'logout': break; case 'error': alert(oDoc.getElementById('_error').innerHTML); oDoc.body.innerHTML="
" break; default: } } function checkLogin(){ if(jQuery('#username').val()==''){ alert('请填写用户名!');return false;} var oIframe = document.getElementById("_postproxy"); var oDoc = oIframe.contentWindow || oIframe.contentDocument; if (oDoc.document) { oDoc = oDoc.document; } oDoc.getElementById('username').value=jQuery('#username').val(); oDoc.getElementById('password').value=jQuery('#password').val(); oDoc.getElementById('formhash').value=jQuery('#formhash').val(); oDoc.getElementById('loginform').action='http://www.bdall.com/bdall.passport.php?ac=login'; oDoc.getElementById('loginform').submit(); return false; } document.write("");