Hi guys
I'm trying to grab emails from URL and display.
- <script type="text/javascript">
- $(document).ready(function () {
- $("#submit").click(function () {
- var curUrl = $("#url").val();
-
- function extractEmails(curUrl)
- {
- return curUrl.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
- }
-
- document.getElementById('result').innerHTML = curUrl;
-
- //Grab URL
- //Grab Emails RegEx
- //Output Emails to screen with counter
- //Save to database
- $( "body" ).load( curURL ).text(extractEmails(curUrl).join('\n'));
-
- });
- });
- </script>
Here are my codes
But it doesn't display the emails?
What are my mistakes here?
How to fix this?
thanks in advance.