Created
May 20, 2014 03:50
-
-
Save reacher-lu/0234b924fa38d3d6b443 to your computer and use it in GitHub Desktop.
截取一个链接里面的域名
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var str = $(".buy").attr("href").match(/^http:\/\/([^\/]+)\//i)[0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment