<td _ngcontent-c2="" style="/* display: table-cell; *//* text-overflow: ellipsis; *//* width: 250px; *//* white-space: nowrap; *//* overflow: hidden; *//* text-overflow: ellipsis; */">"PaymentRequestDto [systemId=FZHolidays, entityId=GIYBV20180611054717483, paymentId=FZLEKS20180611054912756, currency=AED, amount=1419.18, apiOperation=null, requestType=TRAVEL, gateway=TNSPAY, transactionRef=87904, sessionId=4ba806bf-9ab7-49ad-bda7-0526e38d8601, billTo=BillToDto [firstName=sdad, lastName=adad, street=sadad, street1=null, street2=null, city=adada, state=null, postalCode=null, country=BH, emailId=null], travelDetails=TravelDetailsDto [departureDate=2018-07-10, departureTime=23:20, gmtVariation=+04:00, bookingChannel=WEB, carrierCode=FZ, flightNumber=FZ 547:FZ 548, fareBasisCode=RRBP8AE5:RRBP8AE5, passengerCount=1, completeRoute=DXB-CMB:CMB-DXB, journeyType=Return, legs=[LegDto [origin=DXB, destination=CMB, id=1], LegDto [origin=CMB, destination=DXB, id=2]]], items=[ItemDto [unitPrice=665.9709621993128, quantity=1, productCode=SERVICE, productName=FLT, productSKU=DXB-CMB:CMB-DXB, firstName=one, lastName=test, userID=1, status=Reserved, userType=Adult, userEmail=a@test.com, userPhone=+2134543535345, chargeDetails=[]]], threeDSecureInfo=null, ipAddress=10.1.20.128, browserAcceptHeader=null, browseUserAgentHeader=null, redirectionURL=null, locale=null, systemData=SystemDataDto [field1=AIR & LAND, field2=Mahasen by Foozoo, field3=2.5, field4=260.94, field5=CMB, field6=N, field7=, field8=FZE, field9=LK, field10=null, field11=null, field12=N, field13=null, field14=null, field15=null, field16=null, field17=null, field18=null, field19=null, field20=null, field21=null, field22=null, field23=null, field24=null, field25=null, field26=null, field28=null, field29=null, field30=null, field31=null, field32=null, field33=null, field34=null, field35=null, field36=null, field37=null, field38=null, field39=null, field40=null, field41=null, field42=null, field43=null, field44=null, field45=null, field46=null, field47=null, field48=null, field49=null, field50=null], pnrDetails=null, deviceFingerprintID=null, channel=null, cyberSourceProfile=FZH, taDetails=null, paymentMethod=CARD, successURL=https://qa-bookholidays.flydubai.com/payment-capture?s=GIYBV20180611054717483&locale=en&d=CMB, failureURL=null, cancelURL=null, pendingURL=null, notificationURL=http://qa-sys-bookholidays.flydubai.com/AccountsManager/fzeps, contactInfo=PayerContactInfoDto [email=a@test.com, phoneNumber=+2134543535345], generatedOTP=null]"</td>
考虑以上是我的td,必须在3个或4个字符后显示..(点),不能使用任何脚本。
单击它时,整个文本应显示在弹出窗口中
答案 0 :(得分:0)
这就是你想要的吗?
您可以通过单击来切换文本可见性
var element = document.querySelector(".mytd");
element.addEventListener("click", function() {
this.classList.toggle("mytd");
})
td.mytd {
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
<table>
<tr>
<td _ngcontent-c2="" class="mytd">"PaymentRequestDto [systemId=FZHolidays, entityId=GIYBV20180611054717483, paymentId=FZLEKS20180611054912756, currency=AED, amount=1419.18, apiOperation=null, requestType=TRAVEL, gateway=TNSPAY, transactionRef=87904, sessionId=4ba806bf-9ab7-49ad-bda7-0526e38d8601,
billTo=BillToDto [firstName=sdad, lastName=adad, street=sadad, street1=null, street2=null, city=adada, state=null, postalCode=null, country=BH, emailId=null], travelDetails=TravelDetailsDto [departureDate=2018-07-10, departureTime=23:20, gmtVariation=+04:00,
bookingChannel=WEB, carrierCode=FZ, flightNumber=FZ 547:FZ 548, fareBasisCode=RRBP8AE5:RRBP8AE5, passengerCount=1, completeRoute=DXB-CMB:CMB-DXB, journeyType=Return, legs=[LegDto [origin=DXB, destination=CMB, id=1], LegDto [origin=CMB, destination=DXB,
id=2]]], items=[ItemDto [unitPrice=665.9709621993128, quantity=1, productCode=SERVICE, productName=FLT, productSKU=DXB-CMB:CMB-DXB, firstName=one, lastName=test, userID=1, status=Reserved, userType=Adult, userEmail=a@test.com, userPhone=+2134543535345,
chargeDetails=[]]], threeDSecureInfo=null, ipAddress=10.1.20.128, browserAcceptHeader=null, browseUserAgentHeader=null, redirectionURL=null, locale=null, systemData=SystemDataDto [field1=AIR & LAND, field2=Mahasen by Foozoo, field3=2.5, field4=260.94,
field5=CMB, field6=N, field7=, field8=FZE, field9=LK, field10=null, field11=null, field12=N, field13=null, field14=null, field15=null, field16=null, field17=null, field18=null, field19=null, field20=null, field21=null, field22=null, field23=null,
field24=null, field25=null, field26=null, field28=null, field29=null, field30=null, field31=null, field32=null, field33=null, field34=null, field35=null, field36=null, field37=null, field38=null, field39=null, field40=null, field41=null, field42=null,
field43=null, field44=null, field45=null, field46=null, field47=null, field48=null, field49=null, field50=null], pnrDetails=null, deviceFingerprintID=null, channel=null, cyberSourceProfile=FZH, taDetails=null, paymentMethod=CARD, successURL=https://qa-bookholidays.flydubai.com/payment-capture?s=GIYBV20180611054717483&locale=en&d=CMB,
failureURL=null, cancelURL=null, pendingURL=null, notificationURL=http://qa-sys-bookholidays.flydubai.com/AccountsManager/fzeps, contactInfo=PayerContactInfoDto [email=a@test.com, phoneNumber=+2134543535345], generatedOTP=null]"</td>
</tr>
</table>
答案 1 :(得分:0)
您已经在代码中对此进行了注释。
编辑: 您无法隐藏溢出文本并显示弹出窗口。因为它也隐藏了弹出窗口。您必须使用隐藏的溢出或使用弹出窗口。 td标签使其他解决方案更加困难。