<script type="text/javascript">
function checkURL(url) {
return(url.match(/\.(jpeg|jpg|gif|png)$/) != null);
}
alert(checkURL("https://www.test.com/dd.jpg"));
</script>
网友回复
<script type="text/javascript">
function checkURL(url) {
return(url.match(/\.(jpeg|jpg|gif|png)$/) != null);
}
alert(checkURL("https://www.test.com/dd.jpg"));
</script>
网友回复