<script>
var id= location.search.substring(1).split('=')[1] //获取url上的数据
</script>
===================================
angularjs获取url上的参数
https://localhost.8080/postedit?username="sukai";
$scope.username = $location.search().username;
<script>
var id= location.search.substring(1).split('=')[1] //获取url上的数据
</script>
===================================
angularjs获取url上的参数
https://localhost.8080/postedit?username="sukai";
$scope.username = $location.search().username;