我有这个代码:
<script type="text/javascript" language="javascript">
function Get_QS_Values() {
var arr = new Array();
var qs = location.search.substring(1);
var Qs_Value = new Array();
var str = "";
arr = qs.split('&');
for (i = 0; i < arr.length; i++) {
Qs_Value = arr[i].split('=');
str += '' + Qs_Value[1] + '<br />';
var test = str;
}
document.getElementById("Querystring").innerHTML = str;
}
</script>
<body onload="Get_QS_Values();">
<div id="Querystring">
</div>
<script type="text/javascript" language="javascript">
document.write(test);
</script>
</body>
我应该如何在变量中保存值以便我可以在页面上写入?
谢谢