0

ファイルアップロードフィールドでボタン名を「参照」から変更できないという奇妙な問題に直面しています。

複数の言語をサポートするには、この機能が必要です。xtype:textfield と入力タイプを「ファイル」として使用しています

この問題の解決にご協力ください。EXTJS 3.4を使用しています

xtype:'textfield'
input type : 'file'
4

2 に答える 2

3

これに使用できる優れた拡張機能があります。3.4の例にあります。

ファイルアップロードフィールドの例

FileUploadField.js ファイルuploadield.css

jsFiddle の例

Ext.onReady(function () {


    new Ext.Viewport({


        layout: 'fit',
        items: [
            {
                xtype: 'form',
                items: [
                    {
                        xtype: 'textfield',
                        fieldLabel: 'Textfield with inputType=file',
                        inputType: 'file'
                    },
                    {
                        xtype: 'fileuploadfield',
                        width: 200,
                        emptyText: 'Select a file',
                        fieldLabel: 'FileUploadField UX',
                        name: 'blah-blah',
                        buttonText: 'Custom Text'
                    }
                ],

                title: 'Form'
            }
        ]
    });

});
于 2013-03-20T14:37:39.917 に答える
0
<html>
<head>
</head>
<body>
<form>
<input type=text name=file style="width:60px"> 
<input type=file name=newfile style="display:none">
<input type=button onClick="newfile.click();file.value=newfile.value; " value="import from excel">
</form>
</body>
</html>
于 2014-01-09T04:44:44.530 に答える