myiframe 是iframe的id
function search(word){
$('#myiframe').attr('src', 'ProductsS.aspx?q=' + word + '');
}
<input id="abcd" maxlength="20" name="" size="20" type="text" value="" />
<input onclick="search(getElementById('abcd').value)" type="button" value="查詢" />