Last active
December 21, 2017 04:55
-
-
Save howie50417/6ee7b87fd2790bd5d964697c2882096d to your computer and use it in GitHub Desktop.
p1.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="breast-new-tuba.htm"><img src="img/18/yes-18.png" class="img-responsive center-block"></a> | |
改成 | |
<a id="breast-new-tuba"><img src="img/18/yes-18.png" class="img-responsive center-block"></a> | |
然後加上 | |
<script> | |
$(document).ready(function() { | |
$("#breast-new-tuba").click(function(){ | |
localStorage.agree_18r = true; | |
window.location = "breast-new-tuba.htm"; | |
}); | |
}); | |
</script> | |
然後在需要18r才可進入的網頁加上 | |
<script> | |
$(document).ready(function() { | |
if (localStorage.agree_18r != true){ | |
window.location = "18alert-test.htm"; | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment