Append 関数を使用する Javascript でリストを作成したいと考えています。
index.php ファイル、script.js ファイル、および mysql クエリを作成する search.php ファイルがあります。
すべてが機能するようになりましたが、レイアウトが最適ではありません。だから私はレイアウトをより良くする方法を考え出しました。
リストとして表示したいのですが、これはCSSまたはテーブルで行う必要がありますか?
現在、このように表示されます 414622570992222
this.number=70992222 this.code=4146225
だから私が好きにしたいのは、このようなボーダーのないリストです(ただし、ボーダーはありません)。
----------------------
| Number   | Code    |
----------------------
| 70992222 | 4146225 |
----------------------
これが私のscript.jsファイルからのコードです。
$.each(data.results, function(){
                        //Give the list element a rel with the data results ID incase we want to act on this later, like selecting from the list
                        $('#results-list').append("<li rel='" + this.number + "'>" + this.code + this.number + "</li>");
そして、これは私のindex.phpファイルの表示行です
        <div id='results-holder'>
            <ul id='results-list'>