サブ fixed.js   Last modified: Mar 25, 2004

function fixed(x, d)
{
  var temp = Math.round(x*Math.pow(10,d))/Math.pow(10,d)
  if ((""+temp).charAt(0) == ".") {
    temp = "0"+temp
  }
  else if ((""+temp).substring(0,2) == "-." ) {
    temp = "-0"+((""+temp).substring(1,(""+temp).length))
  }
  return temp
}


・ 直前のページへ戻る  ・ E-mail to Shigenobu AOKI

Made with Macintosh