|
本帖最后由 kimilyc 于 2018-9-30 15:39 编辑
求助大神,如何用VBA上传.msg(outlook文件)到以下网站,由于是公司内网,所以只能给出html代码
document.getElementById("attachments_upload_file").value="***"已经试过,不管用
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <script src="/js_min/jquery.js" type="text/javascript"></script>
- <script type="text/javascript" src="https://internal-cdn.amazon.com/sentry.amazon.com/public/javascripts/openid.xhr.js"></script>
- <style>
- body {
- font-family: Arial;
- font-size: 12px;
- }
- #attachments_upload_file {
- max-width: 300px;
- }
- </style>
- </head>
- <form action="relate-file.cgi" method="post" enctype="multipart/form-data" id="attachments_upload_form">
- <b>Upload a File:</b><br>
- <input type="hidden" id="upload_ticket_id" name="ticket_id" value="0134529069"/>
- <input type="hidden" id="upload_file_name" name="file_name" value="no_name"/>
- Choose a File: <input name="file" type="file" id="attachments_upload_file">
- <input value="Upload" type="submit" id="attachments_upload_submit" onclick="attachment_submit();">
- </form>
- <img src="/images/bar-loader.gif" id="attachments_upload_spinner" style="display:none"/>
- <script>
- function attachment_submit() {
- $("#upload_file_name").val($("#attachments_upload_file").val());
- $('#attachments_upload_spinner').append('<img src="/routing_widget/stats/file_uploaded.gif"/>');
- $('#attachments_upload_spinner').show();
- $('#attachments_upload_form').hide();
- var ticket_id = $('#upload_ticket_id').val();
- if (/^E?[0-9]{9,10}/.test(ticket_id)){
- var file_name = $("#attachments_upload_file").val().replace(/C:\\fakepath\\/, "");
- parent.$.wfa.webService('createTicketAuditEntry',
- {case_id:ticket_id, to_string:file_name, type:'257'},
- function() {},
- function(xhr, textStatus, error) {},
- 10);
- }
- }
- parent.get_attachments()
- </script>
- </html>
复制代码
|
|