簡體   English   中英

在html image tag中獲取圖像的路徑。 <img> 標簽?

[英]Getting Path of image in html image tag.so how can i get URL of image from <img> tag?

我正在使用telerik rad圖像編輯器。 上傳圖片時,我使用radimage.content關鍵字獲取其url,但獲取的是類似html image標簽的url。 所以我不能在另一個控件中使用它,因為它是html標記,而不是簡單的url格式。

是否有任何關鍵字可從telerik radimageeditor獲取網址或從html圖像標簽獲取網址? Image = reImage.Content; 用於獲取url,但現在正在獲取html image標簽。

radimage編輯器

str = reImageAdd.Content; ;

            // Grab just the "src" attribute containing your image
            images = Regex.Match(str, "src=\"([^\"]*)\"").Groups[1].Value; // yields "http//www.abc.com/phoneimage.jpg"

首先將內容保存到字符串中。現在字符串str中包含類似的內容,然后使用第二個代碼塊,我們可以找到路徑和過濾器路徑並保存到另一個字符串中,這樣我們就可以將該字符串保存到數據庫中

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM