0
<input name="uploadedFile" type="file" id="uploader"  
   data-dojo-type="dojox/form/Uploader" 
   data-dojo-props="style:'height: 26px; width: 75px; '"  label="Browse"  /> 

上面的代码只显示标签和浏览按钮,而不是文本框。如何分别显示标签文本框和浏览按钮。

4

1 回答 1

0

在此处查看测试:http: //download.dojotoolkit.org/release-1.8.1/dojo-release-1.8.1/dojox/form/tests/test_Uploader.html

showInput:'before'在 data-dojo-props 中指定选项。

<form method="post" action="UploadFile.php" id="myForm2" enctype="multipart/form-data" >
     <fieldset>
        <legend>Inline Browse Button Form Post Test</legend>
        <div data-dojo-type="dojox.form.Uploader" id="uploader2" data-dojo-props="name:'uploadedfile',showInput:'before',isDebug:true">Browse</div>
        <input type="text" name="album" value="Summer Vacation" />
        <input type="text" name="year" value="2011" />
        <input type="button" id="remBtn2" label="Clear" dojoType="dijit.form.Button" />
        <input type="submit" label="Submit" dojoType="dijit.form.Button" />
        <div id="files2" dojoType="dojox.form.uploader.FileList" uploaderId="uploader2"></div>
    </fieldset>
</form>
于 2012-10-25T12:36:41.893 回答