我想删除部分文字,但我不知道该怎么做。
这是我的地址:https://localhost:44390/upload/productpic/productmainpic
我需要在我的地址https://localhost:44390/
中将其删除:upload/productpic/productmainpic
我在此行中找到'h'的第一个索引,但是当我需要找到upload
的'/'时,它会找到/
的{{1}}。
现在我该怎么做?
答案 0 :(得分:5)
您可以像下面这样使用System.Uri类:
$(document).ready(function() {
$('.turbo').on('click', function() {
document.getElementById('status').innerHTML = 'Turbo clicked';
$('.accelerate').click(function() {
alert('accelerate clicked & pressed for 3 seconds');
});
});
});
这将为您提供/ upload / productpic / productmainpic