本文整理汇总了PHP中Combo::AddOption方法的典型用法代码示例。如果您正苦于以下问题:PHP Combo::AddOption方法的具体用法?PHP Combo::AddOption怎么用?PHP Combo::AddOption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Combo
的用法示例。
在下文中一共展示了Combo::AddOption方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Button
<link rel="stylesheet" href="piwidata/css/default.css" type="text/css" />
</head>
<body>
<?php
include_once "Piwi.php";
$button = new Button("boton", "Boton");
$button->SetSubmit();
$button->SetStock(STOCK_CANCEL);
$button->AddEvent(new JSEvent(ON_CLICK, "javascript:alert('huevudisimo');"));
//$button->Show ();
$entry = new Entry("cajita", "Una cosa");
$entry->AddEvent(new JSEvent(ON_CHANGE, "javascript:alert(this.value)"));
$entry->AddEvent(new JSEvent(ON_CHANGE, "javascript:alert(calcMD5(this.value));", "http://jaws.com.mx/templates/controlpanel/md5.js"));
//$entry->Show ();
$combo = new Combo("opciones");
$combo->AddOption("Jaws Proyect", "jawsproject");
$combo->AddOption("Piwi Proyect", "piwiproject");
$combo->AddOption("mBloggy", "mbloggy");
$combo->SetDefault("mbloggy");
//$combo->Show ();
$combogroup = new ComboGroup("opciones2");
$pares = array();
$impares = array();
for ($i = 0; $i < 20; $i++) {
if ($i % 2 == 0) {
$pares[] = new ComboOption("numero {$i}", "N�mero {$i}");
} else {
$impares[] = new ComboOption("numero {$i}", "N�mero {$i}");
}
}
$combogroup->AddGroup("pares", "pares", $pares);