問題:
原始程式
<a href="np.asp?ctNode=31789&CtUnit=11502&BaseDSD=7&mp=059" title="參觀相關需知">3-1.參觀相關需知</a>
建議修改:
應導向此頁面才正確,然而該頁面為空,應再補上相對應內容
問題:
###可能原因:
不支援embed標籤
建議修改:
$(function(){
//if (window.location.protocol!="https:"){window.location.href="https:"+window.location.href.toString().split(window.location.protocol)[1];}
$(document).attr("title","法務部矯正署屏東監獄首長信箱");
$('#username').val(getCookie("BossmailUserName"));
$('#phone').val(getCookie("Bossmailphone"));
$('#mailfrom').val(getCookie("BossmailMailFrom"));
$('#subject').val(getCookie("BossmailSubject"));
$('#content').val(getCookie("BossmailContent"));
$('#address').val(getCookie("BossmailAddress"));
$('#form1').submit(function(){
if ($('#username').val()==''){ alert('請輸入您的真實姓名'); $('#username').focus(); return false;}
//if ($('#phone').val()==''){ alert('請輸入您的聯絡電話'); $('#phone').focus(); return false;}
if ($('#mailfrom').val()==''){ alert('請輸入您的電子信箱'); $('#mailfrom').focus(); return false;}
//if ($('#subject').val()==''){ alert('請輸入您的意見主旨'); $('#subject').focus(); return false;}
if ($('#content').val()==''){ alert('請輸入您的意見內容'); $('#content').focus(); return false;}
if ($('#content').val().length>3000){ alert('意見內容輸入請於3000個中文字以內'); $('#content').focus(); return false;}
if ($('#strCAPTCHA').val()==''){ alert('請輸入驗證碼'); $('#strCAPTCHA').focus(); return false;}
$('#form1').attr('action', window.location.protocol+'//'+window.location.host+'/BossmailAction.asp');
setCookie("BossmailUserName",$('#username').val());
setCookie("Bossmailphone",$('#phone').val());
setCookie("BossmailMailFrom",$('#mailfrom').val());
//setCookie("BossmailSubject",$('#subject').val());
setCookie("BossmailContent",$('#content').val());
setCookie("BossmailAddress",$('#address').val());
});
$('#BtnPlayCaptcha').click(function(){
document.getElementById('playCaptcha').contentWindow.document.write('<audio id="music" src="'+window.location.protocol+'//'+window.location.host+'/captchaWave.asp" hidden="true"></audio>');
document.getElementById('playCaptcha').contentWindow.document.getElementById('music').play()
});
$('#BtnChangeCaptcha').click(function(){
$('#imgCaptcha').attr('src', window.location.protocol+'//'+window.location.host+'/captcha.asp?r='+(new Date()).toLocaleTimeString());
});
});
function setCookie(cname, cvalue) {
var d = new Date();
d.setTime(d.getTime() + (20*60*1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires;
}
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1);
if (c.indexOf(name) != -1) return c.substring(name.length,c.length);
}
return "";
}