For example:
The effect we hope to get is : Click "Bank of China", the check box will be selected (or canceled). There is no problem in FireFox, CHROME and other browsers, but IE browser does not like this.
The solution is to use JS:
window.onload = function(){
if(document.all && navigator.appVersion.indexOf("MSIE")>-1 && navigator.appVersion.indexOf("Windows")>-1 )
{
var a = document.getElementsByTagName("label");
for(var i=0,j=a.length;iif(a[ i].hasChildNodes && a[i].childNodes.item(0).tagName == "IMG")
{
a[i].childNodes.item(0).forid = a[i]. htmlFor;
a[i].childNodes.item(0).onclick = function(){
var e = document.getElementById(this.forid);
switch(e.type){
case "radio": e.checked|=1;break;
case "checkbox": e.checked=!e.checked;break;
case "text": case "password": case "textarea ": e.focus(); break;
}
}
}
}
}
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn