G
Guest
hello. i want to determine whether the percentage sign (%) exists in the
page's address, so i write this code:
<script language=javascript>
presentAdd = self.location
<!-- "self.location" cannot be replaced by the actual file name because it
will be employed in different pages -->
if (presentAdd.indexOf('%') > -1) {
document.write('present')
} else {
document.write('absent')
}
</script>
IE returns an error message "Object doesn't support this property or method".
What should be modified?
Thanks.
page's address, so i write this code:
<script language=javascript>
presentAdd = self.location
<!-- "self.location" cannot be replaced by the actual file name because it
will be employed in different pages -->
if (presentAdd.indexOf('%') > -1) {
document.write('present')
} else {
document.write('absent')
}
</script>
IE returns an error message "Object doesn't support this property or method".
What should be modified?
Thanks.