jsの常用方法
1443 ワード
//------------------
function bytelength(szString) {
return szString.replace(new RegExp("[^\x00-\xff]","g")," ").length;
}
//------------------ span
document.getElementById("isActiveShow"+id).style.display = "none";
document.getElementById("isActivedisplay"+id).style.display = "";
//------------------JavaScript
<script type="text/javascript">
function document.onkeydown() //
{
if(event.keyCode==13) //
{
if(document.activeElement.id=="rightform:textfield"){ // ,
document.getElementById("rightform:button17").click(); // id jsf id,html
return false;
}
}
}
</script>
//-------------------
<a href="javascript:window.external.AddFavorite(window.document.location,window.document.title)"> </a></span>
//-------------------
//addCountry
if (document.all) { //ie
window.attachEvent("onload", addCountry);
} else { //ff
window.addEventListener("load", addCountry, false);
}