Tick the checkbox and click OK to display the value of the check box in the multiline text box, how do I get it?

Source: Internet
Author: User
a.php page:


Recipient account:
<textarea name="receiver_id" id="receiver_id" title="一行一个号码" style="width:400px;" rows="5" onchange="return check_user_sms_post_receiver();">{$mobiles}</textarea>


A number of a line when mass





You have selected 0-bit



Click on the "Select My Students" page of a to go to the b.php page:




Select All


You have selected

-bit









{foreach from= $xueyuan _list item=xy Name=xy_name} {if $smarty. foreach.xy_name.iteration > 1 and ($smarty. foreach.xy_name.iteration-1)% eq 0} {/if} {/foreach}

{$xy. Name}


In the b.php page, tick bcheckboxes[], and click on the selection, how to a.php in the CheckBox2 this multi-line text box to display a number per line, instead of the number separated by number??


Reply to discussion (solution)

In the b.php page, tick checkboxes[], and click on the selection, how to a.php in the receiver_id this multi-line text box to display a number per line, instead of the number separated by number??

How did you get back to a from B?

Since you're going to be separated by a number. Would you like to replace the comma with a newline (Chr (10) or "\ n")?

This is the relevant JS


function Check_user_sms_post_receiver ()
{
var Str_receiver_account = $ ("textarea[name=receiver_id]"). Val ();
Str_receiver_account = Str_receiver_account.replace (/\n|\r/g, "");
Str_receiver_account = Str_receiver_account.replace (/\s+/g, "");

var ARR_ACC = Str_receiver_account.split (","). Unique ();
$ ("textarea[name=receiver_id]"). Val (ARR_ACC);

$ ("#xzw"). HTML (arr_acc.length);
}

function Check_user_sms_post_mobile ()
{
var str_mobile = $ ("textarea[name=receiver_id]"). Val ();
Str_mobile = Str_mobile.replace (/\n|\r/g, "");
Str_mobile = Str_mobile.replace (/\s+/g, "");

var ARR_ACC = Str_mobile.split (","). Unique ();

$ ("textarea[name=receiver_id]"). Val (ARR_ACC);

for (Var i=0;i {
if (!checkmobile (Arr_acc[i]))
{
Alert (' Phone number ' + arr_acc[i] + ' incorrect! ');
$ ("textarea[name=receiver_id]"). focus ();
return false;
}
}

}

Is anybody going to do that? Is anybody going to do that?

Can someone please help me?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.