JSで表示した画像を横並びにしたいです。関数をfor文でランダムに二つづつ呼び出して表示しています。
function a(){ document.write("<form action='facemash.php' method='post'>"); document.write("<input type='hidden' name='good' value='good'>"); document.write("<input type='image' src='2016-07-18 11.55.16.jpg'width='500px'height='500px'display='inline'> "); document.write("</form>"); document.write("<?php echo $file;?>"); } function b(){ document.write("<form action='facemash.php' method='post'>"); document.write("<input type='hidden' name='good1' value='good1'>"); document.write("<input type='image' src='2016-07-18 11.55.30.jpg'width='500px'height='500px'display='inline''> "); document.write("</form>"); document.write("<?php echo $file1;?>");} function c(){document.write("<form action='facemash.php' method='post'>"); document.write("<input type='hidden' name='good2' value='good2'>"); document.write("<input type='image' src='2016-07-18 11.51.25.jpg'width='500px'height='500px'display='inline'> "); document.write("</form>"); document.write("<?php echo $file2;?>");} function d(){document.write("<form action='facemash.php' method='post'>"); document.write("<input type='hidden' name='good3' value='good3'>"); document.write("<input type='image' src='2016-07-18 11.52.21.jpg'width='500px'height='500px'display='inline'> "); document.write("</form>"); document.write("<?php echo $file3;?>");} for (var i = 0 ; i < 2 ; i++){ func = ["a","b","c","d"]; n = Math.floor(Math.random()*4); eval(func[n])(); } </script>
inputタグの中でdisplayを当てても変わりませんでした。表示された画像をそれぞれ横に並べたいのですが...。widthやheightは適用されます。どうしたらよいでしょうか?