转到javascript代码的其他部分

时间:2016-05-19 14:52:02

标签: javascript html function if-statement login

我正在创建一个包含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

0 个答案:

没有答案