关于如何提交2个按钮提交数据的任何好主意? BR SonnichHi all!I have a file where I''d have to submit buttons, and I need to differbetween those.Step #1 - open html win with default selectionStep #2 - user may select some criteries for the listStep 2 might be repeated, or not used at all. There is a button "applyselection"Step #3 - user selects a number of files/items, which are then handled.There is a button for that.Done.The point is, that I need both the critearies for the SQL selection instep 2, but also the selected files (list) in step 3. Actually theselection for step 2 are needed for step 3 only.Any good ideas on how I might have 2 buttons with submits data?BRSonnich 不完全确定你要做什么,但如果你想要两个提交 按钮,只需给它们不同的名字: < input type =" submit"名称= QUOT; FOO" value =" First Button" < input type =" submit"名称= QUOT;栏" value =" Second Button" /> 在目标页面上: if(isset(Not entirely sure what you''re trying to do, but if you want two submitbuttons just give them different names:<input type="submit" name="foo" value="First Button"/><input type="submit" name="bar" value="Second Button"/>And on the target page:if(isset( _REQUEST [''foo''])){ //使用了第一个按钮 } else if( isset(_REQUEST[''foo''])) {//first button was used}else if(isset( _REQUEST [''bar''])){ //使用第二个按钮 }_REQUEST[''bar''])) {//second button was used} 这篇关于表格有2个提交按钮......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-22 23:52