<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title> Untitled 1</title>
<body>
<div id= "Testwrap" >
</div>
<script>
function Imgclick () {
var hhj;
Hhj=document.getelementbyid ("Testimage"). getattribute ("src");
window.location= "http://www.jsjdzx.com/bbs/images/upfile/200753182445.htm?testImage=" +HHJ;
}
</script>
<a href= "Javascript:imgclick ();" onclick= "Javascript:imgclick ();" > Send picture Address </a>
</body>
Processing page:
Copy Code code as follows:
<Html>
<Head>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<Title> Example </Title>
<script>
function QueryString ()
{///construct parameter object and initialize
var name,value,i;
Var str=location.href;//gets browser address bar URL string
var num=str.indexof ("?")
STR=STR.SUBSTR (num+1)//intercept "?" The argument string that follows
var arrtmp=str.split ("&")//separating parameters to form a parameter array
For (I=0;i < arrtmp.length;i++) {
Num=arrtmp[i].indexof ("=");
if (num>0) {
Name=arrtmp[i].substring (0,num);//Get parameter name
VALUE=ARRTMP[I].SUBSTR (num+1)//Get parameter value
this[name]=value;//defines the object properties and initializes the
}
}
}
var request=new querystring ();//Create a Parameter object instance using the new operator
</script>
</Head>
<Body>
<script>
var newelement=document.createelement ("div");//Create Div Object
var str= "Picture address is:<u>" +request["Testimage"]+ "</u>"; get parameter contents with instance [field name]
NEWELEMENT.INNERHTML=STR;
Document.body.appendChild (newelement);//Add a Div object to the document
</script>
</Body>
</Html>