2009-07-01 45 views
2

我的代碼是:傳遞形式參數

//cron.html  
<head> 
<meta http-equiv=Content-Type content="text/html; charset=windows-1252"> 
<meta name=ProgId content=Word.Document> 
<meta name=Generator content="Microsoft Word 11"> 
<meta name=Originator content="Microsoft Word 11"> 
< 
</head> 

<body> 
<form method="post" action="CETrafficGenerator.php?step=2"> 
<input type="text" name="url"/> 




</body> 

</html> 

代替鍵入URL我可以使其通過cron.html URL = 這種格式的?

需要幫助

+0

最大的問題,我在這裏看到:發電機= Microsoft Word中! – 2009-07-02 14:28:34

+0

這只是一個元標籤...一個任意標籤! – 2009-07-02 17:15:41

回答

2

是的,你可以做,但你必須使用javascript填寫表單字段。您可以使用jQuery來簡化操作 - 有關更多信息,請參見http://projects.allmarkedup.com/jquery_url_parser/。例如:

$('url).value = jQuery.url.param('url'); 

然後使表單字段是這樣的:

<input type="text" name="url" id="url" value="" /> 
0

不,你不能。如果你想自動填充表單,你可以做到這一點叫CETrafficGenerator.php?步= 2 & URL = http://google.com唯一,但你必須從改變「法」「後」到「得到」

<form method="get" action="CETrafficGenerator.php?step=2"> 
<input type="text" name="url"/> 
</form> 
1

簡短的回答==沒有

你需要一些編程(php,asp,javascript)來獲取查詢字符串的值並將其插入到文本框中。