-------------------------------------------------
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
$(document).ready(function(e) {
var cur_url = window.location.href;
var lastSegment = cur_url.split('/').pop();
$('#btn').click(function(e) {
alert(lastSegment);
});
});
</script>
-------------------------------------------------
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
$(document).ready(function(e) {
var cur_url = window.location.href;
var lastSegment = cur_url.split('/').pop();
$('#btn').click(function(e) {
alert(lastSegment);
});
});
</script>
-------------------------------------------------
No comments:
Post a Comment