我想把页面复选框选中的值传给控制器的某个方法,应该怎么实现啊?需要用小物件吗?ajax、js怎么实现啊?求救啊~少年们
如图所示,我想全选,或者选某些个,然后把value值传个某个方法进行下一步操作。
虽然用小物件可以把值传给控制器,但是只能传给当前方法
那么问题来了
如果我的select()方法是查看所有数据,但是如果我想把查看出来的数据传给其他方法进行操作,怎么传过去呀?
跪下了。
我想到的方法是把值传给当前的方法,然后从这个方法中把接受到的值传给其他方法进行操作。
但是我想应该有方法可以自己选择传到那个方法进行操作的,但是初学者不懂。
回复讨论(解决方案)
不解。你提交action的时候 在后台的actionAction(){}方法里直接获取$a=Yii::app()->request->getPost('name');
$a = array()//取值是个数组。
1
2
这跟你用框架有什么关系??
你用widget也是要先赋值在显示的。先搞清楚你要做什么功能在提问,我从字面了解的意思,你就是提交复选框,后台获取值而已!
不解。你提交action的时候 在后台的actionAction(){}方法里直接获取$a=Yii::app()->request->getPost('name');
$a = array()//取值是个数组。
1
2
这跟你用框架有什么关系??
你用widget也是要先赋值在显示的。先搞清楚你要做什么功能在提问,我从字面了解的意思,你就是提交复选框,后台获取值而已!
我的天啊!我居然犯傻了,我明白怎么做了,感谢你的回答啊!!!

Long URLs, often cluttered with keywords and tracking parameters, can deter visitors. A URL shortening script offers a solution, creating concise links ideal for social media and other platforms. These scripts are valuable for individual websites a

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

The 2025 PHP Landscape Survey investigates current PHP development trends. It explores framework usage, deployment methods, and challenges, aiming to provide insights for developers and businesses. The survey anticipates growth in modern PHP versio

In this article, we're going to explore the notification system in the Laravel web framework. The notification system in Laravel allows you to send notifications to users over different channels. Today, we'll discuss how you can send notifications ov


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

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Atom editor mac version download
The most popular open source editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
