勾选复选框,点击确定后,将复选框的值分行显示在多行文本框内,怎么弄?
A.php页面:
群发时一个号码一行
您选择了0位
点击A页面的“选择我的学员”后进入到B.php页面:
全选: 您选择了 位 |
{$xy.name} |
在B.php页面里勾选Bcheckboxes[],并点击选择后,怎么在A.php里的checkbox2这个多行文本框里每行显示一个号码,而不是用,号隔开号码??
回复讨论(解决方案)
在B.php页面里勾选checkboxes[],并点击选择后,怎么在A.php里的receiver_id这个多行文本框里每行显示一个号码,而不是用,号隔开号码??
从 B 怎么回到 A 的 ?
既然你会是用,号隔开。那么把逗号换成换行(chr(10) 或 "\n")不就可以了吗?
这是相关JS
<script> <br /> function checknum_() <br /> { <br /> var num=0; <br /> <br /> $("input[name='checkboxes[]']:checkbox").each(function(){ <br /> //this.checked=!this.checked; <br /> <br /> if(this.checked == true) <br /> { <br /> num=num+1; <br /> } <br /> <br /> }) <br /> $("input[name=sl]").val(num); <br /> //alert(num); <br /> <br /> } <br /> <br /> function insert_() <br /> { <br /> <br /> $("input[name='checkboxes[]']:checkbox").each(function(){ <br /> //this.checked=!this.checked; <br /> <br /> if(this.checked == true) <br /> { <br /> if( $.trim($("textarea[name=receiver_id]",window.opener.document).val()) != "" ) <br /> { <br /> $("textarea[name=receiver_id]",window.opener.document).val( $.trim($("textarea[name=receiver_id]",window.opener.document).val())+"," ); <br /> } <br /> <br /> $("textarea[name=receiver_id]",window.opener.document).val( $.trim($("textarea[name=receiver_id]",window.opener.document).val())+this.value ); <br /> <br /> } <br /> <br /> }) <br /> <br /> window.opener.check_user_sms_post_receiver(); <br /> window.opener.check_user_sms_post_mobile(); <br /> } <br /> </script>
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('手机号' + arr_acc[i] + '不正确!');
$("textarea[name=receiver_id]").focus();
return false;
}
}
}
有人会吗?有人会吗?
有人能帮帮忙吗??

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

When you click the search field in Windows 11, the search interface automatically expands. It displays a list of recent programs on the left and web content on the right. Microsoft displays news and trending content there. Today's check promotes Bing's new DALL-E3 image generation feature, the "Chat Dragons with Bing" offer, more information about dragons, top news from the Web section, game recommendations, and the Trending Search section. The entire list of items is independent of your activity on your computer. While some users may appreciate the ability to view news, all of this is abundantly available elsewhere. Others may directly or indirectly classify it as promotion or even advertising. Microsoft uses interfaces to promote its own content,

In iOS 17, you can set multiple timers on your iPhone using the Clock app, or use Siri to set it hands-free. We discuss both in this article. Let's take a look at them. Set Multiple Timers on iPhone Using the Clock App Open the Clock app on your iPhone and tap the Timers tab in the lower right corner. Now, set the hours, minutes, and seconds. You can use the "Label" and "When does the timer end" options to set a name for the timer and a preferred tone when the timer completes. This will help you differentiate between timers. Once done, click the "Start" button. Then, click the "+" icon in the upper right corner. Now, repeat the above steps to set multiple timers on iPhone. You can also browse

Microsoft's Windows 11 operating system may periodically display suggestions as pop-ups on your computer using the notification system. The suggestions system, originally intended to provide users with tips and suggestions for improving their Windows 11 workflows, has almost completely transformed into an advertising system to promote Microsoft services and products. Suggestion pop-ups might advertise a Microsoft 365 subscription to users, suggest linking an Android phone to the device, or set up a backup solution. If these pop-ups annoy you, you can tweak your system to disable them entirely. The following guide provides recommendations on disabling pop-ups on devices running Microsoft’s Windows 11 operating system.
![How to set up my business card in Contacts on iPhone [2023]](https://img.php.cn/upload/article/000/465/014/169538863364905.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
With My Business Cards in iOS, you can create a personalized contact card that Siri and other services recognize and associate with you and your phone number. With the introduction of contact posters in iOS17, My Cards becomes very important as it is now used to create your contact posters. If you're eager to get your contact poster up and running, you have to start by setting up My Business Card. We'll walk through how to create a My Business Card and how to make it work smoothly with Siri and your contact poster. How to Set Up My Business Cards in Contacts on iPhone [2023] If you are setting up My Business Cards on your iPhone for the first time, you must do it through the Contacts app only

How to Make a GroceryList on iPhone in iOS17 Creating a GroceryList in the Reminders app is very simple. You just add a list and populate it with your items. The app automatically sorts your items into categories, and you can even work with your partner or flat partner to make a list of what you need to buy from the store. Here are the full steps to do this: Step 1: Turn on iCloud Reminders As strange as it sounds, Apple says you need to enable reminders from iCloud to create a GroceryList on iOS17. Here are the steps for it: Go to the Settings app on your iPhone and tap [your name]. Next, select i

What happens when the desktop layout is locked? When using the computer, sometimes we may encounter the situation where the desktop layout is locked. This problem means that we cannot freely adjust the position of desktop icons or change the desktop background. So, what exactly is going on when it says that the desktop layout is locked? 1. Understand the desktop layout and locking functions. First, we need to understand the two concepts of desktop layout and desktop locking. Desktop layout refers to the arrangement of various elements on the desktop, including shortcuts, folders, widgets, etc. we can be free

Using jQuery to Real-time Update the Selected Status of Check Boxes In web development, we often encounter situations where we need to update the selected status of check boxes in real time. By using jQuery, we can easily implement the function of updating the selected status of the check box in real time. Here's how to use jQuery to accomplish this task. First, we need to prepare a simple HTML structure containing multiple checkboxes:

There are many users using Remote Desktop Connection. Many users will encounter some minor problems when using it, such as the other party's taskbar not being displayed. In fact, it is probably a problem with the other party's settings. Let's take a look at the solutions below. How to display the other party's taskbar during Remote Desktop Connection: 1. First, click "Settings". 2. Then open "Personalization". 3. Then select "Taskbar" on the left. 4. Turn off the Hide Taskbar option in the picture.
