推奨:ASP 3.0高度なプログラミング(42) 5。関数の戻り値処理値は、ストアドプロシージャリターン値の値とは異なり、多くの場合、混乱につながります。関数では、機能が正常に実行されるかどうかを示すために、ブール値が返されることがよくあります。 sonefunctionname()= true then 'function successの場合
| 以下は引用されたコンテンツです。 00000000000000000000000000000000000000000000000000000000000 <% function Comma(str) そうでない場合(is -numeric(str))またはstr = 0 結果= 0 elseif len(fix(str))<4 then 結果= str それ以外 pos = strust(1、str、。) pos> 0の場合 dec = mid(str、pos) ifを終了します res = strreverse(fix(str)) loopcount = 1 while loopcount <= len(res) tempresult = tempresult mid(res、loopcount、3) loopcount = loopcount 3 loopcount <= len(res)の場合 Tempresult = Tempresult、 ifを終了します ウェンド result = strreverse(tempresult)12月 ifを終了します コンマ=結果 エンド関数 %> <html> <body> <% Allownumber = 12345678 %> フォーマットされていない番号:<%= Number%> <br>に沿って コンマフォーマットされた番号:<%= Comma(anlyNumber)%> </body> </html> |
共有:ASPを使用して、オンライン試験システムを実装しますインターネットテクノロジーの開発により、オンライン教育は人々の再教育と生涯教育の主な形になります。オンラインスクールでは、人々は時間と空間で制限されることなく、どこでもどこでもコースを選択できます。オンライン学校の開発は、オンライン試験の開発を提案しています