效果视频
<script type="text/javascript">
window.onload = function(){
GetRequest();
}
function GetRequest() {
var url = location.search;
var theRequest = new Object();
var color=null;
var result=null;
var person=null;
var but1=null;
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
result=unescape(strs[0].split("=")[1]);
color=unescape(strs[1].split("=")[1]);
person=unescape(strs[2].split("=")[1]);
but1=unescape(strs[3].split("=")[1]);
}
console.log(result);
console.log(color);
console.log(person);
console.log(but1);
if(result=="1")
{
document.getElementById("proresult").innerHTML="操作成功";
document.getElementById("error").style.display='none';
}
else
{
document.getElementById("proresult").innerHTML="操作失败";
document.getElementById("m-duigou").style.display='none';
}
if(person!="")
{
document.getElementById("perresult").innerHTML=person;
}
else
{
document.getElementById("time_div").style.display='none';
document.getElementById("user_div").style.display='none';
}
if(but1!="1")
{
document.getElementById("button1").style.display='none';
}
document.getElementById("button1").style.backgroundColor=color;
document.getElementById("m-box").style.backgroundColor=color;
}
script>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
<body>
<div class="up">
<div class="m-box" id="m-box">
<div class="m-duigou" id="m-duigou">div>
<div class="error" id="error">div>
div>
<div class="p1" id="proresult">div>
<div class="user_div" id="user_div">
<div >
操作者:
div>
<div id="perresult">
div>
div>
<div class="time_div" id="time_div">
<div >
操作时间:
div>
<div id="time" >
div>
div>
div>
<div class="bottom">
<input type="submit" value="完成" class="button1" id="button1">
div>
body>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32