0
我想从PHP中获取一个变量从PHP不使用窗体。 所以我没有方法选项帖子,得到等等,因为我已经附上了代码,我想在php中的变量'buy1'的值,我试过id而不是名称,但没有工作,因为如何访问在PHP文件中没有使用get或post和action属性?我真的在这里挣扎。得到一个变量在PHP中从无形式的HTML
jQuery(document).ready(function($) {
var myPlaylist = [
{
mp3:'thumb/audio/1.mp3',
//oga:'thumb/audio/1.ogg',
title:'Rock and Roll',
artist:'Artist 1',
rating:4,
buy:'',
price:"<a href='#' target='_blank' title='Download Sample'><i class='cloud download icon'></i></a> **<a href='test.php' name='buy1' target='_blank' title='Purchase'><i class='payment icon'></i></a>** <a href='#' target='_blank' title='View On Spotify'><i class='spotify icon'></i></a> <a href='#' target='_blank' title='View On SoundCloud'><i class='soundcloud icon'></i></a> <a href='#' target='_blank' title='View On Itunes'><i class='apple icon'></i></a>",
您只能从客户端的浏览器(“html”)获取数据到服务器(“php”)的方式是通过某种HTTP请求。这是您想要提交给服务器的*用户提供的*值,对吗? – alexw