Guest User

Untitled

a guest
Jan 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. <input id="title" class="seourl" name="title" type="text" value="???">
  2. <input id="subtitle" class="seourl" name="title" type="text" value="???">
  3. <input id="subtitle2" class="seourl" name="title" type="text" value="???">
  4.  
  5. <a id="getFriendlyUrl" href="">get url friendly</a>
  6.  
  7. $("#getFriendlyUrl").click(function() {
  8.  
  9. var arr_str = new Array();
  10.  
  11. ?????? POPULATE ARRAY with input fields of class 'seourl', how ??????????????
  12.  
  13. });
  14.  
  15. $("#getFriendlyUrl").click(function() {
  16.  
  17. var arr_str = $('.seourl').map(function() {
  18. return this.value;
  19. }).toArray();
  20. });
  21.  
  22. return $(this).val();
  23.  
  24. $("#getFriendlyUrl").click(function() {
  25.  
  26. var arr_str = new Array();
  27. $('.seourl').each(function() {
  28. arr_str.push($(this).attr('value'));
  29.  
  30. });
  31. alert(arr_str);
  32. });
  33.  
  34. $('.seourl').each(function(ele){
  35. arr_str.push($(ele).val());
  36. });
  37.  
  38. $("#getFriendlyUrl").click(function() {
  39. var arr_str = new Array();
  40.  
  41. $('.seourl').each(function() {
  42.  
  43. arr_str.push( $(this).val() );
  44. })'
  45.  
  46. });
  47.  
  48. <input id="title" class="seourl" name="title" type="text" value="???">
  49. <input id="subtitle" class="seourl" name="title" type="text" value="???">
  50. <input id="subtitle2" class="seourl" name="title" type="text" value="???">
  51.  
  52. <a id="getFriendlyUrl" href="">get url friendly</a>​
  53.  
  54. $("#getFriendlyUrl").click(function() {
  55.  
  56. var arr_str = new Array();
  57.  
  58. $(".seourl").each(function(index, el) {
  59. arr_str[index] = $(el).val();
  60. });
  61. alert(arr_str[0] + arr_str[1] + arr_str[2]);
  62.  
  63. });​
Add Comment
Please, Sign In to add comment