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