var browserName=navigator.appName; if (browserName=="Microsoft Internet Explorer") {
var soloNombre = encodeURI(soloNombre);
soloNombre = soloNombre.replace("C:%5Cfakepath%5C","");
var soloNombre = decodeURI(soloNombre);
alert(soloNombre); }
................................
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<title>Testing the FakePath String</title>
</head>
<body>
<form id="Form1" action="" method="post">
<input type="file" /><input type="button" onclick="alert(this.previousSibling.value);" value="select file and press the button" />
</form>
</body>
</html>
var soloNombre = encodeURI(soloNombre);
soloNombre = soloNombre.replace("C:%5Cfakepath%5C","");
var soloNombre = decodeURI(soloNombre);
alert(soloNombre); }
................................
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<title>Testing the FakePath String</title>
</head>
<body>
<form id="Form1" action="" method="post">
<input type="file" /><input type="button" onclick="alert(this.previousSibling.value);" value="select file and press the button" />
</form>
</body>
</html>
No comments:
Post a Comment