IOS JS onclick 交互

未结帖
0 5127
ajian admin_jim 2018-09-04
悬赏:5飞吻
function setClickData(operation_type,extra_id,jump_url){

    console.log(operation_type);
    console.log(extra_id);
    console.log(jump_url);
    $('input[name="operation_type"]').val(operation_type);
    $('input[name="extra_id"]').val(extra_id);
    $('input[name="jump_url"]').val(jump_url);
    var requestData = {};
    requestData.operation_type = operation_type;
    requestData.extra_id = extra_id;
    requestData.jump_url = jump_url;
    window.location.href = "next://"+JSON.stringify(requestData);
}
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
     NSString *requestString = [[[request URL] absoluteString]stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    DLog(@"%@",requestString);
    
    return YES;
    
}


热忱回答0


最近热帖

近期热议

  1. javascript——prototype与__proto 9
  2. Mysql 中出现的Data truncated for column 3
  3. 在nginx中使用x-sendfile的解决方案 3
  4. 高版本jQuery面插件实现Ajax上传图片 1
  5. Thinkphp Socket.class.php 类的使用 1
  6. 使用ionic3创建第一个App 0
  7. ios-oc html5 0
  8. nginx.conf 0
  9. 基于ionic3.4.0的项目搭建 0
  10. php 缩略图 0