我正在创建一个包含html,css和javascript的数据存储站点。在登录时,它使用函数内的if / else。我需要的一个例子如下:
$('.activelogin').click(function(){
//get the username
//get the password
if (username === 'myName') {
document.cookie = 'succesful=true';
//go to more code
} else {
document.cookie = 'successful=false';
}
//more code
如何从//more code
访问//go to more code
?