<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="../css/mui.min.css" rel="stylesheet" />
</head>
<body>
<select id="div99"></select>
</body>
<script src="../js/mui.min.js"></script>
<script src="../js/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
mui.init();
window.location.href="url转换1.html?work1="+encodeURIComponent(work1)+"&work2="+encodeURIComponent(work2)+"&work3="+encodeURIComponent(work3)+"&work4="+encodeURIComponent(work4)+"";
/* url转化*/
var get_url = function (url, data) {
var back_data = {};
url = url.substr(url.indexOf('?') + 1, url.length);
for ( key in data) {
back_data[data[key]] = '';
if(url.indexOf(data[key])>-1){
back_data[data[key]] = url.substr(url.indexOf(data[key])+data[key].length+1)
if(url.substr(url.indexOf(data[key])+data[key].length+1).indexOf("&")>-1){
back_data[data[key]] = url.substr(url.indexOf(data[key])+data[key].length+1).substr(0,url.substr(url.indexOf(data[key])+data[key].length+1).indexOf("&"));
}
}
}
return back_data;
}
var datass=['work1','work2','work3','work4'];
var work = get_url(url,datass);
const work1 = decodeURIComponent(work.work1);//
const work2 = decodeURIComponent(work.work2);//
const work3 = decodeURIComponent(work.work3);//
const work4 = decodeURIComponent(work.work4);//
console.log(work1);
console.log(work2);
console.log(work3);
console.log(work4);
</script>
</html>