看板 Flash 關於我們 聯絡資訊
: : : -- : ※ 發信站: 批踢踢實業坊(ptt.cc) : ◆ From: 220.132.190.171 : ※ 編輯: mysteriousGE 來自: 220.132.190.171 (12/15 17:51) : 推 Jedic:印出是什麼意思? 傳入又是什麼方式? 12/15 18:21 : 推 drawtide:貼一下語法吧 12/17 10:01 : 推 dmans:要不要試用一個變數去接收你轉換的數值看看 12/18 15:56 問題是這樣的 傳過來的變數為 class_all 其中 reply_txt .... 是動態文字欄位的變數 loadVariables("cl.php", _root, "POST"); _root.onData = function() { reply_txt2=class_all; //顯示 76 reply_txt1=Number(class_all); //顯示 NaN reply_txt=typeof(class_all); //顯示 string } 想了幾種解決方法 都不行><" 1.先定義該變數型態 loadVariables("cl.php", _root, "POST"); var class_all:Number; _root.onData = function() { reply_txt2=Number(class_all) //顯示 NaN reply_txt1=class_all; //顯示 76 reply_txt=typeof(class_all); //顯示 string } 2.定一個變數去接此變數 loadVariables("cl.php", _root, "POST"); _root.onData = function() { var kkk:Number=class_all; reply_txt2=Number(kkk); //顯示 NaN reply_txt1=kkk; //顯示 76 reply_txt=typeof(kkk); //顯示 string 請各位邦我想想該如何解決 ><"" 有點急 謝謝喔 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.132.190.171
mysteriousGE:解決了....parseInt(class_all) :) 12/20 23:51