借助浏览器实现PDF预览
jquery获取select选中的值:
$('#brand').change(function(){var brand=$("#brand option:selected").val();alert(brand);});
jquery字符串转json:
var obj = jQuery.parseJSON(msg);alert(obj);
联动菜单:
$(document).ready(function(){$('#submit').click(function(){var name=$('#name').val();var price=$('#price').val();if(!name){alert('名称不能为空');$('#name').focus();return false;}if(!price){alert('价格不能为空');$('#price').focus();return false;}});$('#brand').change(function(){var brand=$("#brand option:selected").val();$('#series').empty();$('#model').empty();//alert(brand);if(brand==0){alert('请选择品牌');}else{$.ajax({type: 'get',async: false,url:'/web/index.php',data:'c=platform&a=service&do=json&type=1&id='+brand,success:function(msg){var obj = jQuery.parseJSON(msg);//alert(obj);$("
visible
Insert title here
浏览器关闭
window.onbeforeunload = function(){ return "Are you sure ?";}