/* Audi Base Javascript */ function showPopup(idElemPopupMessages, title) { if (Modalbox.initialized) { console.log("modalbox already shown"); return false; } try { var elemPopupMessages = document.getElementById(idElemPopupMessages); var text = elemPopupMessages.innerHTML; if (text.trim().length > 0) { Modalbox.show('
' + text + '
', { title : title, width : 450, overlayClose : false }); }//only remove if no error occured elemPopupMessages.style.display = "none"; } catch (err) { //do nothing console.log("error occured: " + err); } } function checkSpecificKeyReg(e) { if (null == e || '' == e || undefined == e) { return; } var specialKey =new RegExp("[~'!#$%^&*()+_=:<>]"); var realkey = e; if (specialKey.test(realkey)) { alert('请勿输入特殊字符: ' + realkey); return false; } return true; }