目前,我有这个无线电台。
- Eletronics
- Computers
- Others
如果是无线电台,我想做的是什么。 选择了其他,我希望显示一个投入文本领域,让用户类型。
在我选择<代码>时,我想做些什么。 其他和输入领域的一些东西类型,然后,当我选择回到<条码>[>/条码>或<条码>Computers时,我要澄清我在投入领域撰写的案文。
请向我提供 Java或 j的解决办法。
这里是我的法典样本。 请核对:。 http://jsfiddle.net/dnGKM/。
目前,我有这个无线电台。
如果是无线电台,我想做的是什么。 选择了其他,我希望显示一个投入文本领域,让用户类型。
在我选择<代码>时,我想做些什么。 其他和输入领域的一些东西类型,然后,当我选择回到<条码>[>/条码>或<条码>Computers时,我要澄清我在投入领域撰写的案文。
请向我提供 Java或 j的解决办法。
这里是我的法典样本。 请核对:。 http://jsfiddle.net/dnGKM/。
<>>>>>
$( input:radio ).on( click , function() {
if($(this).attr( id ) == others ) {
$( #showhide ).css( opacity , 1.0);
} else {
$( #showhide ).css( opacity , 0).find( input:text#others_text ).val( );
}
});
你们可以这样做:
document.getElementById("others_text").value= ;
明确投入领域。
请在您的法典中加入以下行文:
document.getElementById("others_text").value = ;
现在,它喜欢:
document.getElementById("others").addEventListener("click", function()
{
document.getElementById("others_text").value = ;
document.getElementById("showhide").style.opacity = 1;
}, false);
document.getElementById("computers").addEventListener("click", function()
{
document.getElementById("showhide").style.opacity = 0;
}, false);
document.getElementById("electronics").addEventListener("click", function()
{
document.getElementById("showhide").style.opacity = 0;
}, false);
这对你有益。
采用这一解决办法:
$(function() {
$( input[type="radio"] ).click(function() {
if($(this).attr( id ) == others ) {
$( #others-text ).show();
} else {
$( #others-text ).hide();
$( #others-text ).val( );
}
});
})
这里有一份联合材料。
页: 1 女士们:
CSS:
.hidden {
display: none;
}
传真:
<label for="electronics">Electronics</label>
<input type="radio" id="electronics" name="rdbutton" />
<label for="computers">Computers</label>
<input type="radio" id="computers" name="rdbutton" />
<label for="others">Others</label>
<input type="radio" id="others" name="rdbutton" />
<input type="text" id="others-text" name="others-text" class="hidden" />
JS:
$(function() {
$( input[type="radio"] ).click(function() {
if($(this).attr( id ) == others ) {
$( #others-text ).removeClass( hidden );
} else {
$( #others-text ).addClass( hidden );
$( #others-text ).val( );
}
});
});
=============超值=====================================================
<input type="radio" name="rdo" value="1" checked="checked" />Electronics
<input type="radio" name="rdo" value="2" />Computers
<input type="radio" name="rdo" value="3" />Others
==========jQuery=======================================jQuery=============================
$( input[name=rdo] ).change(function() {
var a = $(this).val();
if (a != 3) {
$( #textboxid ).hide();
}else{
$( #textboxid ).val( );
$( #textboxid ).show();
}
});
$("#<%=text1.ClientID%>").val( );
How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.
I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...
Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...
Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...
I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...
Is it possible for someone to give me a few pointers on how to display a multidimensional array in the form of a bar graph? The array is multidimensional, with three elements in each part - and the ...
Is it possible to reload a form after file-input change? I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it ...
I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.