如何编写一个函数以document.write
根据当前 URL 有条件地运行?
<script language="JavaScript">
<!--
function urlCheck() {
if(
window.location.href=="address to check"
)
{
/* some code to load */
}else{
document.write('<div>testing my super loaded div code sample</div>')
}
}
urlCheck() /* autoLoadFunction */
//-->
</script>