<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="test.js" οnlοad="TB.SomeFun('a=b&c=d')"> </script>
<title>Title</title>
</head>
<body>
</body>
</html>
test.js文件:
TB = {};
TB.SomeFun = function(arg)
{
console.log(arg);
var arr = arg.split('&');
for(i=0; i<arr.length; ++i) {
console.log(arr[i]);
}
};