第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么將我的 div 類更改為表單會改變我網(wǎng)站的功能

為什么將我的 div 類更改為表單會改變我網(wǎng)站的功能

慕勒3428872 2023-09-18 10:10:36
我正在為我的網(wǎng)站上傳文件,當(dāng)我嘗試將 id 為“cool-border”的 div 更改為表單元素以便能夠上傳文件時,我的代碼不再有效。當(dāng)我選擇一個文件時,文件名不再顯示在文件文本范圍中。我刪除了一些用于拖放過程的代碼以整理混亂,但是是的,我很困惑抱歉,縮放比例不穩(wěn)定,哈哈,我還沒有讓它響應(yīng)body {    margin: 0;    padding: 0;    box-sizing: border-box;    font-family: Arial, Helvetica, sans-serif;    background-color: black;}#dropContainer {    border-radius: 1em;    color: #effffb;    background-color: #6cd89d;        font-size: large;    font-weight: bold;    margin: 20px;    padding: 1em;    text-align: center;    line-height: 2em;    max-width: 50vh;}#fakeButton {    background-color: #a5a5a5;    border: none;    border-radius: 5px;    padding: 5px;    cursor: pointer;    color: #effffb;}#fakeButton:hover{    background-color: #5c5c5c;}span {    font-size: small;    font-weight: normal;}#cool-border {    background-image: linear-gradient(90deg, #effffb 50%, transparent 50%), linear-gradient(90deg, #effffb 50%, transparent 50%), linear-gradient(0deg, #effffb 50%, transparent 50%), linear-gradient(0deg, #effffb 50%, transparent 50%);    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;    background-size: 15px 2px, 15px 2px, 2px 15px, 2px 15px;    background-position: left top, right bottom, left bottom, right   top;    animation: border-dance 1s infinite linear;    border-radius: 5px;    padding: 1em;}@keyframes border-dance {    0% {      background-position: left top, right bottom, left bottom, right   top;    }    100% {      background-position: left 15px top, right 15px bottom , left bottom 15px , right   top 15px;    }  }}<!DOCTYPE html><html><head>    <link href="style.css" rel="stylesheet">    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <title>File Upload</title></head><body>
查看完整描述

1 回答

?
楊__羊羊

TA貢獻(xiàn)1943條經(jīng)驗(yàn) 獲得超7個贊

您的按鈕需要具有 type="button" 屬性,如下所示:

<button?type="button"?id="fakeButton">Select?a?file</button>

否則,它充當(dāng)提交按鈕,如果沒有指定操作,它基本上會刷新瀏覽器。

type:?按鈕的默認(rèn)行為??赡艿闹涤校?該按鈕將表單數(shù)據(jù)提交到服務(wù)器。如果未為與表單關(guān)聯(lián)的按鈕指定該屬性,或者該屬性為空值或無效值,則這是默認(rèn)值。

查看完整回答
反對 回復(fù) 2023-09-18
  • 1 回答
  • 0 關(guān)注
  • 96 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號