當前位置:成語大全網 - 新華字典 - Delphi xml SetAttribute的問題, Node.SetAttribute('homepagetype','3'); 這行改完結果3變為51,求破

Delphi xml SetAttribute的問題, Node.SetAttribute('homepagetype','3'); 這行改完結果3變為51,求破

問題在妳的這行代碼中:

Node.SetAttribute('homepagetype','3');

其中 的'3'打了引號,被作為字符處理了,字符'3'的ASCII碼=51

解決的辦法是去掉引號,改成 Node.SetAttribute('homepagetype',3);