Javascript - 截取字符串
str.split("xxx")
<input type="hidden" value='' id="bgimgid">
<script>
var str = '/app/upload/image/survey/bg476.jpg';
var arr = new Array();
arr = str.split("/");
if(arr.length > 1){
var result = arr[arr.length-2];
document.getElementById("bgimgid").value = result;
}
</script>