For checking cookies you can use:
function checkCookie(){
var cookieEnabled = navigator.cookieEnabled;
if (!cookieEnabled){
document.cookie = "testcookie";
cookieEnabled = document.cookie.indexOf("testcookie")!=-1;
}
return cookieEnabled || showCookieFail();
}
function showCookieFail(){
// do something here
}
// within a window load,dom ready or something like that place your:
checkCookie();
And for checking JavaScript use a <noscript>
tag with some kind of message inside
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…