?? hougnt.html
字號:
G("signNamePanel").style.display = "none";
}else{
if(need_verify==10||len>5000){
document.getElementById('yzm').innerHTML=yzm_str;
document.getElementById('yzm').style.display="";
}else{
document.getElementById('yzm').innerHTML='';
document.getElementById('yzm').style.display="none";
}
G("signNamePanel").style.display = "";
}
}
function f_submit(){
try{
if(f_check()){
var params = [
["co",ContentInput.getHtml()],
["ct",document.post.ct],
["tn",document.post.tn],
["word",document.post.word],
["word1",document.post.word1],
["lm",document.post.lm],
["z",document.post.z],
["sc",document.post.sc],
["cm",document.post.cm],
["rn",document.post.rn],
["bs",document.post.bs],
["str2",document.post.str2],
["str3",document.post.str3],
["rs3",document.post.rs3],
["str4",document.post.str4],
["bu",document.post.bu],
["code",document.post.code],
["ti",document.post.ti],
["rs4",document.post.rs4],
["ch1",document.post.ch1],
["rs1",document.post.rs1]
];
if(document.post.ch1 && document.post.ch1.checked && document.post.useSignName && document.post.useSignName.checked){
params[params.length] = ["rs10",document.post.signName];
}
var paramstr = buildParamDataString(params);
formApply(paramstr);
}
}catch(e){}
return false;
};
function formApply(paramsStr)
{
var url = "/f";
this.popup = null;
var postProcess = function(xmlHttp)
{
var rst = eval("(" + xmlHttp.responseText + ")");
var no = rst.resultNo;
var doAction = function(result){
switch(result.getActionType()){
case result.Action_FocusTitle:
if(document.post.ti){
document.post.ti.focus();
document.post.ti.value = document.post.ti.value;
}
break;
case result.Action_FocusContent:
setTimeout(function(){
ContentInput.focus();
},400);
break;
case result.Action_ClearYZM:
if(document.post.word1){
document.post.word1.value = "";
document.post.word1.focus();
}
break;
case result.Action_FocusUrl:
setTimeout(function(){
ContentInput.focus();
},400);
break;
case result.Action_GoToHead:
document.location.hash="pgTop";
break;
case result.Action_FlushAndGoToHead:
ContentInput.clearHtml();
document.location.href = document.location.href.split("#")[0];
break;
default:
break;
}
};
if(no == 0) {// 成功
setTimeout(function(){
doAction(rst);
},500);
}else{
if(rst.isNeedWaitForCheck()){// 等待審核
AlertPopup.alertMessage({width:340,height:165,title:"發表貼子",messageTitle:"等待審核...", content: rst.getMessage()}, function(){
doAction(rst);
document.post.Submit3.disabled = false;
return true;
});
}else {// 失敗
AlertPopup.alertError({width:340,height:165,title:"發表貼子",messageTitle:"發貼失敗", content: rst.getMessage()}, function(){
doAction(rst);
document.post.Submit3.disabled = false;
return true;
});
}
}
};
document.post.Submit3.disabled = true;
new Ajax.Request(
url,
{
method: "post",
parameters: paramsStr,
onComplete: function(xmlHttp){postProcess(xmlHttp);}
}
);
};
function f_check() {
var imageNum = ContentInput.getImageNum();
if(imageNum > g_pg.imageLimite){
G("coError").innerHTML = "抱歉,每層樓插入的圖片不能超過" + g_pg.imageLimite + "張,請修改后重新提交";
ContentInput.focus();
return false;
}
var flashNum = ContentInput.getFlashNum();
if(flashNum > g_pg.flashLimite){
G("coError").innerHTML = "抱歉,每層樓插入的視頻不能超過" + g_pg.imageLimite + "個,請修改后重新提交";
ContentInput.focus();
return false;
}
var smileyNum = ContentInput.getSmileyNum();
if(smileyNum > g_pg.smileyLimite){
G("coError").innerHTML = "抱歉,每層樓插入的表情不能超過" + g_pg.smileyLimite + "個,請修改后重新提交";
ContentInput.focus();
return false;
}
ls_content = ContentInput.getHtml();
if(ContentInput.isEmpty())
{
G("coError").innerHTML = "內容不能為空";
ContentInput.focus();
return false;
}
if(need_verify==10){
if(document.post.word1.value == '' || document.post.word1.value == null)
{
G("yzmError").innerHTML = "驗證碼不能為空,請輸入驗證碼";
document.post.word1.focus();
return false;
}
}
document.post.str2.value = fr_as_js_tr();
return true;
}
r_url=f_escape(window.location.href);
function ResetReplyTitle(no, title) {
if(no == null||no == ""){
if(title == null || title == '')
title_src = g_bdThreadTitleTxt;
else
title_src = title;
}
else{
title_src = G(title).value;// title is a id on here
var s = title_src.indexOf(":");
title_src = title_src.substring(s+1,title_src.length);
}
//刪除末尾可能的空格
if(title_src.lastIndexOf(" ") == title_src.length-1)
{
title_src = title_src.substring(0,title_src.lastIndexOf(" "));
}
document.post.ti.value='回復' + no + ':' + title_src;
if(no && no!="" && no != '1'){
if(ContentInput.isEmpty()){
ContentInput.appendHtml('回復:'+no+'樓<br>');
}else{
ContentInput.appendHtml('<br>回復:'+no+'樓<br>');
}
}
setTimeout(function(){
ContentInput.focus();
},300);
return true;
}
function f_load(){
resetChangedSizeImage();
}
function f_focus(){
if(need_verify==10){
if(document.getElementById('yzm').innerHTML==null || document.getElementById('yzm').innerHTML==''){
document.getElementById('yzm').innerHTML=yzm_str;
document.getElementById('yzm').style.display="";
}
}
}
function f_showVerify(){
var len;
len = getByte(ContentInput.getHtml())
if(len>5000||need_verify==10){
if(document.getElementById('yzm').innerHTML==null || document.getElementById('yzm').innerHTML==''){
document.getElementById('yzm').innerHTML=yzm_str;
document.getElementById('yzm').style.display="";
}
}else{
if(document.post.ch1.checked){
document.getElementById('yzm').innerHTML='';
document.getElementById('yzm').style.display="none";
}
}
}
function f_paste(){
f_showVerify();
if(document.post.ch1 && document.post.ch1.checked){
SignNameApply.active();
}
}
*/
// end 新版
function check_img(){
document.post.word1.focus();
var o_img = document.getElementById('y_img');
o_img.src=img_str +"&t="+ Math.random();
document.post.word1.value="";
}
function f_trim(inputString) {
if (typeof inputString != 'string') { return inputString; }
var retValue = inputString;
var ch = retValue.substring(0, 1);
while (ch == ' ' || ch == '\r' || ch == '\n') {
retValue = retValue.substring(1, retValue.length);
ch = retValue.substring(0, 1);
}
ch = retValue.substring(retValue.length-1, retValue.length);
while (ch == ' ' || ch == '\r' || ch == '\n') {
retValue = retValue.substring(0, retValue.length-1);
ch = retValue.substring(retValue.length-1, retValue.length);
}
while (retValue.indexOf(' ') != -1) {
retValue = retValue.substring(0, retValue.indexOf(' ')) +
retValue.substring(retValue.indexOf(' ')+1, retValue.length);
}
return retValue;
}
function h(obj,url){
obj.style.behavior='url(#default#homepage)';
obj.setHomePage(url);
}
function getLeftChars(varField,limit_len) {
var i = 0;
var counter = 0;
var cap = limit_len;
var j=0;
for (i = 0; i< varField.value.length; i++) {
if (varField.value.charCodeAt(i) > 127 || varField.value.charCodeAt(i) == 94) {
j=j+2;
}
else {
j=j+1
}
} //結束FOR循環
//var leftchars = cap - varField.value.length;
var leftchars = cap - j;
return (leftchars);
}
function onCharsChange(varField,a_str,a_limit) {
var leftChars = getLeftChars(varField,a_limit);
if ( leftChars >= 0) {
return true;
} else {
ls_str = a_str + "超過字數限制!";
window.alert(ls_str);
//var len = document.thform.ti.value.length + leftChars;
//document.login.message.value = document.login.ti.value.substring(0, len);
varField.value=""
return false;
}
}
function f_GoPage(form){
form.rs6.value = f_trim(form.rs6.value);
if(isNaN(form.rs6.value)|| form.rs6.value=="" || form.rs6.length==0){ alert('請輸入一個數字或者不能為空!');return false; }
if(form.rs6.value > 1) {
form.pn.value = (1 - 1)*30;
return true;
}
if(form.rs6.value <= 0) {form.pn.value = 0 ; return true;}
form.pn.value = (form.rs6.value - 1)*30;
return true;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -