У меня есть ярлык costLabel.
Я хочу иметь возможность изменять значение этой метки в зависимости от выбранного значения в раскрывающемся списке.
Это мой HTML:
<table>
<tr>
<td width="343">Package*</td>
<td colspan="4">
<select class="purple" name="package">
<option value="standard">Standard - €55 Monthly</option>
<option value="standardAnn">Standard - €49 Monthly</option>
<option value="premium">Premium - €99 Monthly</option>
<option value="premiumAnn" selected="selected">Premium - €89 Monthly</option>
<option value="platinum">Platinum - €149 Monthly</option>
<option value="platinumAnn">Platinum - €134 Monthly</option>
</select>
</td>
<tr>
<td width="343">
<p>We bills quarterly/annually in advance</p>
<p>See <a href="#dialog" name="modal">Pricing</a> for more details</p>
</td>
<td colspan="4"><label id="costlabel" name="costlabel">Total Cost:</label></td>
<tr>
</table>
Значения, которые входят в метку стоимости, следующие:
class Test {
public static Queue<int> queue = new Queue<int>(10000);
Thread putIntThread;
Thread takeIntThread;
public Test() {
for(int i = 0; i < 5000; ++i) {
queue.Enqueue(0);
}
putIntThread = new Thread(this.PutInt);
takeIntThread = new Thread(this.TakeInt);
putIntThread.Start();
takeIntThread.Start();
}
void PutInt() {
while(true)
{
if(queue.Count < 10000) {//no need to lock here as only itself can change this condition
queue.Enqueue(0);
}
}
}
void TakeInt() {
while(true) {
if(queue.Count > 0) {//no need to lock here as only itself can change this condition
queue.Dequeue();
}
}
}
}
Изменить: я должен использовать .NET 3.5