我有一段动态调用图片网址的JavaScript
if (searchResult['image'] != undefined) {
if (searchResult['link'] != undefined) {
searchResultNode += '<a class="image" href="' + searchResult['link'] + '">';
}
searchResultNode += '<img src="' + searchResult['image'] + '" class="ss360-search-result-image" />';
if (searchResult['link'] != undefined) {
searchResultNode += '</a>';
}
}
我可以编写哪些函数来编辑img src URL,以便删除文件名后缀(.png,.jpg,.jpeg),将“-764x375”添加到URL,然后读取文件名后缀?< / p>